Stacked Bar Chart domain axis scaling

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
dschectman
Posts: 1
Joined: Tue Nov 08, 2016 6:45 pm
antibot: No, of course not.

Stacked Bar Chart domain axis scaling

Post by dschectman » Tue Nov 08, 2016 7:04 pm

Newbie here so forgive me if the same question has been asked many times. I have a stacked bar chart that displays in a fixed width image. The domain (horizontal) is weeks and the range (vertical) is a count of events by type. When generating the chart for a short date range, the domain range tick labels display. When generating the chart for a wide date range, the domain axis ticks display ||||||| because there is not enough width to display every tick and its description. Is there a way to allow the chart to automatically scale the domain axis? For example, assume the width comfortably displays 52 weeks. When generating the chart for more than 52 weeks, I would like the domain axis to automatically scale displaying every other data point (0,2,4...). Similarly, If there are more than 104 weeks, the chart should display every third week (0,3,6...) and so on. Is this configurable or must I manually adjust the data points and tick labels when generating the chart?

paradoxoff
Posts: 1634
Joined: Sat Feb 17, 2007 1:51 pm

Re: Stacked Bar Chart domain axis scaling

Post by paradoxoff » Tue Nov 08, 2016 7:44 pm

Is my post in the FAQ thread helpful?

Locked