Java Code Examples for org.jfree.chart.renderer.xy.XYItemRenderer#setSeriesOutlinePaint()
The following examples show how to use
org.jfree.chart.renderer.xy.XYItemRenderer#setSeriesOutlinePaint() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EyeCandySixtiesChartTheme.java From jasperreports with GNU Lesser General Public License v3.0 | 4 votes |
@Override protected void configurePlot(Plot plot, JRChartPlot jrPlot) { super.configurePlot(plot, jrPlot); if (plot instanceof CategoryPlot) { CategoryPlot categoryPlot = (CategoryPlot)plot; CategoryItemRenderer categoryRenderer = categoryPlot.getRenderer(); CategoryDataset categoryDataset = categoryPlot.getDataset(); if (categoryDataset != null) { for (int i = 0; i < categoryDataset.getRowCount(); i++) { categoryRenderer.setSeriesOutlinePaint(i, ChartThemesConstants.TRANSPARENT_PAINT); } } categoryPlot.setRangeGridlinePaint(ChartThemesConstants.GRAY_PAINT_134); categoryPlot.setRangeGridlineStroke(new BasicStroke(1f)); categoryPlot.setDomainGridlinesVisible(false); } else if (plot instanceof XYPlot) { XYPlot xyPlot = (XYPlot)plot; XYDataset xyDataset = xyPlot.getDataset(); if (xyDataset != null) { XYItemRenderer xyItemRenderer = xyPlot.getRenderer(); for (int i = 0; i < xyDataset.getSeriesCount(); i++) { xyItemRenderer.setSeriesOutlinePaint(i, ChartThemesConstants.TRANSPARENT_PAINT); } } xyPlot.setRangeGridlinePaint(ChartThemesConstants.GRAY_PAINT_134); xyPlot.setRangeGridlineStroke(new BasicStroke(1f)); xyPlot.setDomainGridlinesVisible(false); xyPlot.setRangeZeroBaselineVisible(true); } }
Example 2
Source File: AegeanChartTheme.java From jasperreports with GNU Lesser General Public License v3.0 | 4 votes |
@Override protected void configurePlot(Plot plot, JRChartPlot jrPlot) { super.configurePlot(plot, jrPlot); if(plot instanceof CategoryPlot) { CategoryPlot categoryPlot = (CategoryPlot)plot; CategoryItemRenderer categoryRenderer = categoryPlot.getRenderer(); CategoryDataset categoryDataset = categoryPlot.getDataset(); if(categoryDataset != null) { for(int i = 0; i < categoryDataset.getRowCount(); i++) { categoryRenderer.setSeriesOutlinePaint(i, ChartThemesConstants.TRANSPARENT_PAINT); } } categoryPlot.setRangeGridlinePaint(ChartThemesConstants.GRAY_PAINT_217); categoryPlot.setRangeGridlineStroke(new BasicStroke(0.5f)); categoryPlot.setDomainGridlinesVisible(false); categoryPlot.getDomainAxis().setCategoryLabelPositions(CategoryLabelPositions.UP_45); } else if(plot instanceof XYPlot) { XYPlot xyPlot = (XYPlot)plot; XYItemRenderer xyItemRenderer = xyPlot.getRenderer(); XYDataset xyDataset = xyPlot.getDataset(); if(xyDataset != null) { for(int i = 0; i < xyDataset.getSeriesCount(); i++) { xyItemRenderer.setSeriesOutlinePaint(i, ChartThemesConstants.TRANSPARENT_PAINT); } } xyPlot.setRangeGridlinePaint(ChartThemesConstants.GRAY_PAINT_217); xyPlot.setRangeGridlineStroke(new BasicStroke(0.5f)); xyPlot.setDomainGridlinesVisible(false); xyPlot.setRangeZeroBaselineVisible(true); } }
Example 3
Source File: SimpleChartTheme.java From jasperreports with GNU Lesser General Public License v3.0 | 4 votes |
protected void handleXYPlotSettings(XYPlot p, JRChartPlot jrPlot) { PlotSettings plotSettings = getPlotSettings(); XYItemRenderer xyItemRenderer = p.getRenderer(); Paint[] paintSequence = getPaintSequence(plotSettings, jrPlot); if (paintSequence != null) { for (int i = 0; i < paintSequence.length; i++) { xyItemRenderer.setSeriesPaint(i, paintSequence[i]); } } Paint[] outlinePaintSequence = getOutlinePaintSequence(plotSettings); if (outlinePaintSequence != null) { for (int i = 0; i < outlinePaintSequence.length; i++) { xyItemRenderer.setSeriesOutlinePaint(i, outlinePaintSequence[i]); } } Stroke[] strokeSequence = getStrokeSequence(plotSettings); if (strokeSequence != null) { for (int i = 0; i < strokeSequence.length; i++) { xyItemRenderer.setSeriesStroke(i, strokeSequence[i]); } } Stroke[] outlineStrokeSequence = getOutlineStrokeSequence(plotSettings); if (outlineStrokeSequence != null) { for (int i = 0; i < outlineStrokeSequence.length; i++) { xyItemRenderer.setSeriesOutlineStroke(i, outlineStrokeSequence[i]); } } Boolean domainGridlineVisible = plotSettings.getDomainGridlineVisible(); if (domainGridlineVisible == null || domainGridlineVisible) { PaintProvider domainGridlinePaint = plotSettings.getDomainGridlinePaint(); if (domainGridlinePaint != null) { p.setDomainGridlinePaint(domainGridlinePaint.getPaint()); } Stroke domainGridlineStroke = plotSettings.getDomainGridlineStroke(); if (domainGridlineStroke != null) { p.setDomainGridlineStroke(domainGridlineStroke); } } Boolean rangeGridlineVisible = plotSettings.getRangeGridlineVisible(); if (rangeGridlineVisible == null || rangeGridlineVisible) { PaintProvider rangeGridlinePaint = plotSettings.getRangeGridlinePaint(); if (rangeGridlinePaint != null) { p.setRangeGridlinePaint(rangeGridlinePaint.getPaint()); } Stroke rangeGridlineStroke = plotSettings.getRangeGridlineStroke(); if (rangeGridlineStroke != null) { p.setRangeGridlineStroke(rangeGridlineStroke); } } // p.setRangeZeroBaselineVisible(true); }