ZingChart: Setting gradients

There are 3 different ways to apply gradients:

1. Defining the backgroundColor  attribute with two colors. A space will separate the two values in the string.

backgroundColor: "#ff0000 #e01484"

2. Explicitly defining two background colors with the backgroundColor1  and backgroundColor2  attributes

"background-color-1":"#000",
"background-color-2":"#ccc"

3. Defining a string list of colors to be used as the gradientColors  and a gradientStops  attribute to determine the percentage of bleed for each color.

gradientColors:"red blue green",
gradientStops: "0.3 0.6 0.9"

Example

Documentation

https://www.zingchart.com/docs/api/json-configuration/graphset/series

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us