ChartsOrg / Charts

Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart.
Apache License 2.0
27.61k stars 6k forks source link

Overlapping values #2531

Open MaddyCoder opened 7 years ago

MaddyCoder commented 7 years ago
screen shot 2017-06-18 at 8 13 11 pm

I have many values to be displayed in a small area. The graph is getting plotted properly but the values are overlapping making it difficult to read. So is there any way to avoid this overlapping. I dont want to hide the values. Is there a way where only few values are displayed at first and then as you zoom more values appear like it happens with x axis?

liuxuan30 commented 7 years ago

hmm, it's one defect indeed. But what you could do is to add some bounding check inside drawValues in line chart renderer, to adjust the positions if you detect overlap.

However, you should really give a thought that if you have lots of entries, there will be overlap for sue if you want to display all value labels, because the space is limited. So there is not really much we can do.

Shunshine07 commented 7 years ago

@MaddyCoder Can you tell me how you set x-axis labels in multiline? I have set x-axis labels in multiple lines which are too long.

Karpot commented 6 years ago

A better idea is to draw horizontal lines and avoid to draw so many numbers.