score:2
Highcharts.map is nothing more than simple for
which can be replaced by for(var i = 0; i < colors.length; i++) { ... }
.
Highcharts.Color create color object. You don't need to use that, just create two arrays for colors, one for starting colors, one for end colors:
var startColors = ["#55BF3B", "#DF5353", "#DDDF0D", "#7798BF"];
var endColors = ["#7798BF", "#DDDF0D", "#DF5353", '#55BF3B' ];
Then loop over them to set colors:
$scope.chartConfig.options.colors[0] = {
radialGradient: { cx: 0.5, cy: 0.3, r: 0.7 },
stops: [
[0, startColors[0]],
[1, endColors[0]]
]
}
Source: stackoverflow.com
Related Query
- Add Gradient Pie Chart functionality to Highcharts-ng
- HighCharts Pie Chart - Add text inside each slice
- How to add different click events on each pie of a pie chart created by highcharts usin jquery
- Highcharts display label for pie chart using html table as data source
- Highcharts pie chart legend items showing gradient colors
- highcharts issues in pie chart with gradient fill
- Highcharts - Add a pie chart to a line chart
- Highcharts Pie Chart Add Value to the Legend
- Add text inside a circular progress pie chart bar using HIGHCHARTS
- Highcharts - Add bar graph to a pie chart
- Add labels to columns in highcharts pie chart legend
- Highcharts Pie Chart Specify Pie Slice Gradient Color
- How to display the value instead of percentage in a pie chart using jquery Highcharts
- HighCharts - Make the pie chart 100% of the div
- Place text in center of pie chart - Highcharts
- Highcharts - labels inside and outside a pie chart
- Highcharts saying undefined is not a function when trying to add a new chart
- Highcharts Pie Chart ignores percentageDecimals tooltip setting and has floating point inaccuracy issue
- Highcharts pie chart dynamically changes size
- Highcharts not displaying data labels for Pie chart in arabic
- Add buttons in chart of Highcharts at runtime
- Total of values in HighCharts Pie Chart
- highcharts - chart names for multiple pie chart series in one chart
- Highcharts Pie Chart Drilldown not showing on third drill
- Add additional data to Pie Tooltip on Highcharts
- Highcharts Pie Chart Label Threshold
- How to add space between chart and axis in highcharts
- HighCharts - Pie chart drilldown for multilevel (3 to 4 level)
- Grand Totals in HighCharts Pie Chart Legend
- HighCharts Pie Chart Legend value alignment
More Query from same tag
- Highcharts Gantt milestone series
- highchart not displaying in the center on mobile screen
- External legend in Highcharts
- Unable to format JSON from WCF for HighCharts?
- Highcharts: how to group data points and display the total accordingly?
- Prevent from executing previous JavaScript with turbolinks and highcharts //LazyHighCharts
- Highcharts: X and Y Axis cross at zero in scatter chart
- Is it possible to get highcharts range selector to work with jQuery timepicker, like it works with jQuery datepicker?
- How can I get the max value of a y axis at highcharts?
- Selecting a point programmatically on stockchart from HighCharts library in GWT (Also in native JS)
- How to add Modal pop up on nodes of org chart Highcharts
- Highcharts: Remove left and right padding in column chart
- Highchart - Add dynamic data to the bar
- HighCharts - do not crop series line on max value
- Make Highcharts pick a smart y-axis min
- In Highcharts, are we able to make the border of a pyramid in 'dashed' style?
- How to show full date to my labels and each x axis in different colour in highcharts?
- Use comma values as datapoints within a PieChart
- Comparing percentage with Highstock
- Highchart Marker image hides if large dataset is produced
- How to call a function after Highchart animation complete In Anguler?
- Highstock Highchart empty space between chart and scrollbar
- Want to take difference between single series data and show them on chart in highcharts/highstock
- Colors are not rotating in Highcharts Bubble chart
- Highcharts spline chart points not showing unless zoomed in
- Removing or Switching Events on Highcharts
- How to change the color of series(grouped column chart) only with json object(without js function) on Highchart?
- Drill Down Maps In R + Shiny
- Highcharts line color based on other data than value
- Node JS, Highcharts Memory usage keeps climbing