DateAxis domain = (DateAxis) plot.getDomainAxis(); if (dateCmds[0].equals(date.getSelectedItem())) { domain.setVerticalTickLabels(false); } else { domain.setVerticalTickLabels(true);
axis.setVerticalTickLabels(true);
private static JFreeChart createJFreeChart(final String chartName, final String uom, final XYDataset timeseriescollection) { JFreeChart jfreechart = ChartFactory.createTimeSeriesChart(chartName, "Time", uom, timeseriescollection, true, true, false); XYPlot xyplot = (XYPlot) jfreechart.getPlot(); DateAxis dateaxis = (DateAxis) xyplot.getDomainAxis(); dateaxis.setVerticalTickLabels(true); XYLineAndShapeRenderer xylineandshaperenderer = (XYLineAndShapeRenderer) xyplot.getRenderer(); xylineandshaperenderer.setBaseShapesVisible(true); xylineandshaperenderer.setUseFillPaint(true); xylineandshaperenderer.setLegendItemToolTipGenerator(new StandardXYSeriesLabelGenerator("Tooltip {0}")); return jfreechart; }
dateAxis.setVerticalTickLabels(true); dateAxis.setDateFormatOverride(new SimpleDateFormat("dd.MM.yy HH:mm")); XYPlot plot = new XYPlot(dataset, new SymbolAxis("", catArray), dateAxis, xyRend);
dateAxis.setTickMarkPosition(DateTickMarkPosition.START); dateAxis.setTickMarksVisible(true); dateAxis.setVerticalTickLabels(true); dateAxis.setDateFormatOverride(new SimpleDateFormat("dd'.'MM'.'")); plot.setDomainAxis(dateAxis);
dateAxis.setVerticalTickLabels(true);
domainAxis.setVerticalTickLabels(true); domainAxis.setAutoTickUnitSelection(true); domainAxis.setAutoRange(true);
domainAxis.setTickUnit (new DateTickUnit (DateTickUnit.DAY, 7, new SimpleDateFormat ("yyyy-MM-dd"))); domainAxis.setTickMarkPosition (DateTickMarkPosition.START); domainAxis.setVerticalTickLabels (true); domainAxis.setLowerMargin (0.01); domainAxis.setUpperMargin (0.01);
domainAxis.setTickUnit (new DateTickUnit (DateTickUnit.DAY, 7, new SimpleDateFormat ("yyyy-MM-dd"))); domainAxis.setTickMarkPosition (DateTickMarkPosition.START); domainAxis.setVerticalTickLabels (true); domainAxis.setLowerMargin (0.01); domainAxis.setUpperMargin (0.01);
domainAxis.setTickUnit (new DateTickUnit (DateTickUnit.MONTH, 1, new SimpleDateFormat ("yyyy-MM"))); domainAxis.setTickMarkPosition (DateTickMarkPosition.START); domainAxis.setVerticalTickLabels (true); domainAxis.setLowerMargin (0.01); domainAxis.setUpperMargin (0.01);