wcharczuk / go-chart

go chart is a basic charting library in go.
MIT License
3.99k stars 326 forks source link

It's possible to reduce number of labels on X Axis? #197

Closed zigazajc007 closed 2 years ago

zigazajc007 commented 2 years ago

It's possible to show less values / labels on X Axis? It would be great if it could only show minimum, maximum, the middle and maybe 1 or 2 between those.

stats

wcharczuk commented 2 years ago

what i've done in this situation is you can rotate the labels on the x axis to make them more legible when they're that constrained, or you can drop the number of ticks you're generating to give them more space.

zigazajc007 commented 2 years ago

Thanks.

I can't see any example of text rotation for basic chart.

zigazajc007 commented 2 years ago

Found it:

            Style: chart.Style{
                TextRotationDegrees: 45,
            },