Use gradient colors for a pie chart in a range of two colors

I would like to specify two colors and then create a pie chart like this:

Pie Chart

To create the example, I used the Chart Wizard but it seems to be outdated and we are using pie charts in the application we are building . Is there a way to get this effect in pie charts?

+3


source to share


1 answer


This is not possible with the default configuration options for the new SVG pie charts.

However, CSS can be used to colorize the elements of a pie chart if you are into that. CSS can create gradients in different ways depending on the browser, etc. For more information see this site .

If you want to color a specific element of a pie chart, you can use something like the developer tools in Google Chrome to help track a specific element and recolor that element using CSS as above.



It probably doesn't work as expected in IE (does little).

In general, however, using gradients tends to just be candy canes and actually makes the chart more difficult to read (this doesn't really matter for pie charts, which are usually not the best place to start).

0


source







All Articles