Added gradient and mapMargin