Frage

I have this chart produced by jfreechart's stackedareachart. The label's on the x axis are the months of the year. I need to be able to display every other label. Something like:

Jan Mar Apr Jun Aug Oct Dec

enter image description here

I am able to do this when the Domain Axis is a NumberAxis, but I can't figure it out because the stackedareachart uses a CategoryAxis for the domain Axis. CategoryAxis doesn't have a set tick mark interval method.

What can I do to display a subset of labels?

War es hilfreich?

Lösung

I worked around this issue by using a StackedXYAreaChart instead of StackedAreaChart. The advantage is the Domain Axis is a NumberAxis It also had the benefit of not having those vertical lines running through the graph, so this solution pleased me.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top