Java Code Examples for org.jfree.chart.renderer.category.BarRenderer3D#setItemMargin()

The following examples show how to use org.jfree.chart.renderer.category.BarRenderer3D#setItemMargin() . 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 6 votes vote down vote up
@Override
protected JFreeChart createBar3DChart() throws JRException
{
	JFreeChart jfreeChart = super.createBar3DChart();
	CategoryPlot categoryPlot = (CategoryPlot)jfreeChart.getPlot();
	BarRenderer3D barRenderer3D = (BarRenderer3D)categoryPlot.getRenderer();

	barRenderer3D = new GradientBarRenderer3D(barRenderer3D);
	categoryPlot.setRenderer(barRenderer3D);

	barRenderer3D.setItemMargin(0);
	barRenderer3D.setWallPaint(ChartThemesConstants.TRANSPARENT_PAINT);
	//categoryPlot.setOrientation(PlotOrientation.HORIZONTAL);

	barRenderer3D.setItemMargin(0);

	CategoryDataset categoryDataset = categoryPlot.getDataset();
	if (categoryDataset != null)
	{
		for (int i = 0; i < categoryDataset.getRowCount(); i++)
		{
			barRenderer3D.setSeriesPaint(i, ChartThemesConstants.EYE_CANDY_SIXTIES_GRADIENT_PAINTS.get(i));
		}
	}
	return jfreeChart;
}
 
Example 2
Source File: AegeanChartTheme.java    From jasperreports with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
protected JFreeChart createBar3DChart() throws JRException
{
	JFreeChart jfreeChart = super.createBar3DChart();
	CategoryPlot categoryPlot = (CategoryPlot)jfreeChart.getPlot();
	BarRenderer3D barRenderer3D = (BarRenderer3D)categoryPlot.getRenderer();
	barRenderer3D.setItemMargin(0);
	barRenderer3D.setWallPaint(ChartThemesConstants.TRANSPARENT_PAINT);
	//categoryPlot.setOrientation(PlotOrientation.HORIZONTAL);
	CategoryDataset categoryDataset = categoryPlot.getDataset();
	if(categoryDataset != null)
	{
		for(int i = 0; i < categoryDataset.getRowCount(); i++)
		{
			barRenderer3D.setSeriesOutlinePaint(i, ChartThemesConstants.TRANSPARENT_PAINT);
		}
	}
	return jfreeChart;
}
 
Example 3
Source File: AegeanChartTheme.java    From jasperreports with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
protected JFreeChart createStackedBar3DChart() throws JRException
{
	JFreeChart jfreeChart = super.createStackedBar3DChart();
	CategoryPlot categoryPlot = (CategoryPlot)jfreeChart.getPlot();
	BarRenderer3D barRenderer3D = (BarRenderer3D)categoryPlot.getRenderer();
	barRenderer3D.setWallPaint(ChartThemesConstants.TRANSPARENT_PAINT);
	barRenderer3D.setItemMargin(0);
	CategoryDataset categoryDataset = categoryPlot.getDataset();
	if(categoryDataset != null)
	{
		for(int i = 0; i < categoryDataset.getRowCount(); i++)
		{
			barRenderer3D.setSeriesOutlinePaint(i, ChartThemesConstants.TRANSPARENT_PAINT);
		}
	}
	return jfreeChart;
}
 
Example 4
Source File: EyeCandySixtiesChartTheme.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
protected JFreeChart createStackedBar3DChart() throws JRException
{
	JFreeChart jfreeChart = super.createStackedBar3DChart();
	CategoryPlot categoryPlot = (CategoryPlot)jfreeChart.getPlot();
	BarRenderer3D barRenderer3D = (BarRenderer3D)categoryPlot.getRenderer();
	barRenderer3D.setWallPaint(ChartThemesConstants.TRANSPARENT_PAINT);

	//CategoryDataset categoryDataset = categoryPlot.getDataset();
	barRenderer3D.setItemMargin(0);
	return jfreeChart;
}