Pie Chart Labels

1 Answer 461 Views
Chart
Richard
Top achievements
Rank 4
Iron
Iron
Iron
Richard asked on 08 Nov 2021, 04:04 PM

Good afternoon,

I've managed to successfully produce a pie chart reading remote data, but the pie chart fills the div meaning the labels are unreadable - I've included a simple example below with just two labels, but one is illegible. The div it's in has class "k-content wide".

When there are more labels, they appear over the title.

Is there a way to make the size of the chart adapt to the size of the div it sits in so that all the labels are legible?

Kind regards,

Richard

1 Answer, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 4
Iron
Iron
Iron
answered on 08 Nov 2021, 05:07 PM

I've been able to answer this myself. :-)

I had .Padding(0) set in the Series.  Removing this property enabled the chart to display fully.

Just a shame it's picking yellow, green and orange as default colours rather than something more colourful.

Richard

Tsvetomir
Telerik team
commented on 11 Nov 2021, 08:00 AM

I am writing to confirm that the padding option set to 0 would allow for more space for the labels. As per the colors of the chart, they come from the theme that is applied. You could, of course, fully customize the coloring of the series:

https://demos.telerik.com/aspnet-core/pie-charts

If you are using data items for the series, you could specify the ColorField so that the chart knows which field to use for coloring.

Tags
Chart
Asked by
Richard
Top achievements
Rank 4
Iron
Iron
Iron
Answers by
Richard
Top achievements
Rank 4
Iron
Iron
Iron
Share this question
or