List of usage examples for org.jfree.chart.axis DateAxis setNegativeArrowVisible
public void setNegativeArrowVisible(boolean visible)
From source file:com.intel.stl.ui.common.view.ComponentFactory.java
public static JFreeChart createXYAreaSparkline(XYDataset dataset) { JFreeChart jfreechart = ChartFactory.createXYAreaChart(null, null, null, dataset, PlotOrientation.VERTICAL, false, false, false);//from w w w . ja v a 2s . c o m XYPlot xyplot = (XYPlot) jfreechart.getPlot(); xyplot.setDomainPannable(true); xyplot.setBackgroundPaint(null); xyplot.setOutlinePaint(null); xyplot.setForegroundAlpha(0.8F); xyplot.setDomainGridlinesVisible(false); xyplot.setDomainCrosshairVisible(false); xyplot.setRangeGridlinesVisible(false); xyplot.setRangeCrosshairVisible(false); DateAxis dateaxis = new DateAxis(""); dateaxis.setTickLabelsVisible(false); dateaxis.setTickMarksVisible(false); dateaxis.setAxisLineVisible(false); dateaxis.setNegativeArrowVisible(false); dateaxis.setPositiveArrowVisible(false); dateaxis.setVisible(false); xyplot.setDomainAxis(dateaxis); ValueAxis rangeAxis = xyplot.getRangeAxis(); rangeAxis.setTickLabelsVisible(false); rangeAxis.setTickMarksVisible(false); rangeAxis.setAxisLineVisible(false); rangeAxis.setNegativeArrowVisible(false); rangeAxis.setPositiveArrowVisible(false); rangeAxis.setVisible(false); XYItemRenderer xyitemrenderer = xyplot.getRenderer(); xyitemrenderer.setSeriesPaint(1, UIConstants.INTEL_DARK_GRAY); xyitemrenderer.setSeriesPaint(0, NodeTypeViz.SWITCH.getColor()); return jfreechart; }
From source file:org.jivesoftware.openfire.reporting.graph.GraphEngine.java
/** * Generates a simple Time Axis.// ww w . jav a 2s . co m * * @return the generated Time Axis. */ private DateAxis generateTimeAxis() { DateAxis xAxis = new DateAxis(""); xAxis.setLowerMargin(0.05); xAxis.setUpperMargin(0.02); xAxis.setLabel(null); xAxis.setTickLabelsVisible(true); xAxis.setTickMarksVisible(true); xAxis.setAxisLineVisible(true); xAxis.setNegativeArrowVisible(false); xAxis.setPositiveArrowVisible(false); xAxis.setVisible(true); xAxis.setTickMarkPosition(DateTickMarkPosition.MIDDLE); Locale locale = JiveGlobals.getLocale(); // If the tick units have not yet been setup or the locale has changed if (tickUnits == null || !locale.equals(oldLocale)) { tickUnits = createTickUnits(locale, JiveGlobals.getTimeZone()); oldLocale = locale; } xAxis.setStandardTickUnits(tickUnits); return xAxis; }