How would I set the scale to show a year at a time? I don't want the gantt to auto zoom in.
Thanks,
Jon
Setting scale in gantt chart
Re: Setting scale in gantt chart
Hi Jon,
The axis is an instance of HorizontalDateAxis, and you can set any range you want using the setRange(startDate, endDate) method:
CategoryPlot plot = myGanttChart.getCategoryPlot();
DateAxis axis = (DateAxis) plot.getRangeAxis();
axis.setRange(date1, date2);
...where date1 and date2 are instances of java.util.Date.
Regards,
DG
The axis is an instance of HorizontalDateAxis, and you can set any range you want using the setRange(startDate, endDate) method:
CategoryPlot plot = myGanttChart.getCategoryPlot();
DateAxis axis = (DateAxis) plot.getRangeAxis();
axis.setRange(date1, date2);
...where date1 and date2 are instances of java.util.Date.
Regards,
DG