Using Gradient Fill Mixture |
|
FusionWidgets v3 accepts gradient mix formula for many elements in different charts. For example, in an angular gauge, you can set a gradient mix formula for the color scale, pivot etc. In a horizontal linear gauge, you can again set a gradient mix formula for the color scale. The gradient mix for the color scale in an angular gauge is set using gaugeFillMix=’{light-10},{light-70},{dark-10}’. |
|
Chart with the default gradient mix for the color scale |
Chart with the gradient mix set by <chart ... gaugeFillMix=’{light-10},{light-70},{dark-10}’...> for the color scale |
Here, we explain how you can build the formula for complex gradient formations. How gradient fill mix works?
Examples:
These are how the angular gauges with the above gradient formulas applied to their color scales would look: |
|
{light-10},{light-70},{dark-10},{color} |
{light-10},{light-20},{light-60},{FFFFFF},{dark-30},{dark-40},{dark-40} |
To sum up,
the gradient fill mix formula can take any of the following literals:
|
|
Specifying ratio | |
Apart from specifying the color mix, you can also specify the ratio of each color in the mix. The ratio determines how far that particular color will spread before mixing with the next color and forming a gradient. Ratio is specified by separating them by commas e.g., The ratios should sum upto 100 and the number of ratios should be equal to the number of colors you have specified in the gradient mix. FusionWidgets would automatically map each ratio to the corresponding color in the gradient mix. |
|
Horizontal linear gauge with <chart ... gaugeFillMix='{light-10},{light-70},{dark-10}'...> |
|
<chart gaugeFillMix='{light-10},{light-70},{dark-10}' gaugeFillRatio='60,20,20'…> |
|