javascript - HighCharts: How to combine custom colors with gradient -
javascript - HighCharts: How to combine custom colors with gradient -
for while im playing coloring of pie chart... , either got custom colors without gradient, or default colors gradient... colors stored in php field, want load colors: <?echo $mycolors;?>
. actual state of code (it shows default colors gradient):
colors: highcharts.map(highcharts.getoptions().colors, function(color) { homecoming { radialgradient: { cx: 0.5, cy: 0.3, r: 0.7 }, stops: [ [0, color], [1, highcharts.color(color).brighten(-0.3).get('rgb')] // darken ] }; })
how should edit show own colors in simple way? didn´t find "stops" alternative for...
use colors in map
instead of highcharts built-in ones:
colors: highcharts.map(<?echo $mycolors;?>, function(color) { homecoming { radialgradient: { cx: 0.5, cy: 0.3, r: 0.7 }, stops: [ [0, color], [1, highcharts.color(color).brighten(-0.3).get('rgb')] // darken ] }; })
javascript colors highcharts radial-gradients
Comments
Post a Comment