google/charted

How can I have hole-less pie charts?

johnmccutchan opened this issue · 2 comments

I want the whole pie slice.

This is currently defined in ChartTheme.innerRadius

/**

  • Inner radius of the pie chart. A value of 0 would render a pie chart; any
  • positive number would cause the inner radius of the pie to be the specified
  • number; any negative number would cause the inner radius to be proportional
  • to the number of rows of data being rendered in the pie.
    */
    int innerRadius = -1;

to get a hole-less pie chart, you can set the innerRadius to 0.

You can do chartArea.theme.innerRadius = 0; Or if there are more chart theme properties to override you could implement the ChartTheme class and have each of your chart area use the custom theme.

This will change to the PieChartRenderer having a theme - just the inner radius to start with, which can be passed to the constructor