I am trying to use PeriodAxis in a chart to plot some time series data. The first data point occurs on 2012-01-08 19:00:00, and the data endpoint occurs on 2012-01-09 19:00:00.
When the chart is drawn, cue marks begin at 19:29 and end at 19:29. I want them to start at 19:00 and end accordingly - that is, I do not want: 29-minute fractions. I tried to set tag label increments in 1 hour increments using setStandardTickUnits (), but that didn't change anything. I can't seem to find any other methods for this class that would allow me to change the tick units.

Code example:
PeriodAxis domain = new PeriodAxis(null, new Hour(19, new Day(8, SerialDate.JANUARY, 2012)), new Hour(19, new Day(9, SerialDate.JANUARY, 2012))); domain.setAutoRangeTimePeriodClass(Hour.class); PeriodAxisLabelInfo[] periodLabels = new PeriodAxisLabelInfo[2]; periodLabels[0] = new PeriodAxisLabelInfo(Hour.class, new SimpleDateFormat("HH:mm")); periodLabels[1] = new PeriodAxisLabelInfo(Day.class, new SimpleDateFormat("MMM dd, yyyy")); domain.setLabelInfo(periodLabels); domain.setLowerMargin(0); domain.setUpperMargin(0); TickUnits tu = new TickUnits(); tu.add(new DateTickUnit(DateTickUnit.HOUR, 1)); domain.setAutoTickUnitSelection(true); domain.setStandardTickUnits(tu);
source share