Example usage for org.jfree.chart.axis CategoryLabelPosition getAngle

List of usage examples for org.jfree.chart.axis CategoryLabelPosition getAngle

Introduction

In this page you can find the example usage for org.jfree.chart.axis CategoryLabelPosition getAngle.

Prototype

public double getAngle() 

Source Link

Document

Returns the angle of rotation for the label.

Usage

From source file:net.sf.dynamicreports.test.jasper.chart.AreaChartTest.java

@Override
public void test() {
    super.test();

    numberOfPagesTest(1);/*  w  w w  .  j  a  v a2 s. co  m*/

    JFreeChart chart = getChart("summary.chart1", 0);
    Axis axis = chart.getCategoryPlot().getDomainAxis();
    CategoryPlot categoryPlot = chart.getCategoryPlot();
    Assert.assertEquals("renderer", AreaRenderer.class, categoryPlot.getRenderer().getClass());
    Assert.assertEquals("category label", "category", axis.getLabel());
    Assert.assertEquals("category label color", Color.BLUE, axis.getLabelPaint());
    Assert.assertEquals("category label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont());
    Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint());
    Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont());
    CategoryLabelPosition labelPosition = chart.getCategoryPlot().getDomainAxis().getCategoryLabelPositions()
            .getLabelPosition(RectangleEdge.LEFT);
    Assert.assertEquals("plot label rotation", (45d / 180) * Math.PI, labelPosition.getAngle());
    Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint());

    chart = getChart("summary.chart2", 0);
    axis = chart.getCategoryPlot().getRangeAxis();
    Assert.assertEquals("value label", "value", axis.getLabel());
    Assert.assertEquals("value label color", Color.BLUE, axis.getLabelPaint());
    Assert.assertEquals("value label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont());
    Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint());
    Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont());
    Assert.assertEquals("tick label mask", "10.00", ((NumberAxis) axis).getNumberFormatOverride().format(10));
    Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint());
    Assert.assertEquals("range min value", 1d, ((ValueAxis) axis).getLowerBound());
    Assert.assertEquals("range max value", 15d, ((ValueAxis) axis).getUpperBound());
}

From source file:net.sf.dynamicreports.test.jasper.chart.StackedAreaChartTest.java

@Override
public void test() {
    super.test();

    numberOfPagesTest(1);// w  w  w.j  a  va2 s . c om

    JFreeChart chart = getChart("summary.chart1", 0);
    Axis axis = chart.getCategoryPlot().getDomainAxis();
    CategoryPlot categoryPlot = chart.getCategoryPlot();
    Assert.assertEquals("renderer", StackedAreaRenderer.class, categoryPlot.getRenderer().getClass());
    Assert.assertEquals("category label", "category", axis.getLabel());
    Assert.assertEquals("category label color", Color.BLUE, axis.getLabelPaint());
    Assert.assertEquals("category label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont());
    Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint());
    Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont());
    CategoryLabelPosition labelPosition = chart.getCategoryPlot().getDomainAxis().getCategoryLabelPositions()
            .getLabelPosition(RectangleEdge.LEFT);
    Assert.assertEquals("plot label rotation", (45d / 180) * Math.PI, labelPosition.getAngle());
    Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint());

    chart = getChart("summary.chart2", 0);
    axis = chart.getCategoryPlot().getRangeAxis();
    Assert.assertEquals("value label", "value", axis.getLabel());
    Assert.assertEquals("value label color", Color.BLUE, axis.getLabelPaint());
    Assert.assertEquals("value label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont());
    Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint());
    Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont());
    Assert.assertEquals("tick label mask", "10.00", ((NumberAxis) axis).getNumberFormatOverride().format(10));
    Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint());
    Assert.assertEquals("range min value", 1d, ((ValueAxis) axis).getLowerBound());
    Assert.assertEquals("range max value", 15d, ((ValueAxis) axis).getUpperBound());
}

From source file:net.sf.dynamicreports.test.jasper.chart.LineChartTest.java

@Override
public void test() {
    super.test();

    numberOfPagesTest(1);// w w  w.  j av a2  s .  c  o m

    JFreeChart chart = getChart("summary.chart1", 0);
    CategoryItemRenderer renderer = chart.getCategoryPlot().getRenderer();
    Assert.assertEquals("renderer", LineAndShapeRenderer.class, renderer.getClass());
    Assert.assertFalse("show shapes", ((LineAndShapeRenderer) renderer).getBaseShapesVisible());
    Assert.assertFalse("show lines", ((LineAndShapeRenderer) renderer).getBaseLinesVisible());

    chart = getChart("summary.chart2", 0);
    Axis axis = chart.getCategoryPlot().getDomainAxis();
    Assert.assertEquals("category label", "category", axis.getLabel());
    Assert.assertEquals("category label color", Color.BLUE, axis.getLabelPaint());
    Assert.assertEquals("category label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont());
    Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint());
    Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont());
    CategoryLabelPosition labelPosition = chart.getCategoryPlot().getDomainAxis().getCategoryLabelPositions()
            .getLabelPosition(RectangleEdge.LEFT);
    Assert.assertEquals("plot label rotation", (45d / 180) * Math.PI, labelPosition.getAngle());
    Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint());

    chart = getChart("summary.chart3", 0);
    axis = chart.getCategoryPlot().getRangeAxis();
    Assert.assertEquals("value label", "value", axis.getLabel());
    Assert.assertEquals("value label color", Color.BLUE, axis.getLabelPaint());
    Assert.assertEquals("value label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont());
    Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint());
    Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont());
    Assert.assertEquals("tick label mask", "10.00", ((NumberAxis) axis).getNumberFormatOverride().format(10));
    Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint());
    Assert.assertEquals("range min value", 1d, ((ValueAxis) axis).getLowerBound());
    Assert.assertEquals("range max value", 15d, ((ValueAxis) axis).getUpperBound());
}

From source file:net.sf.dynamicreports.test.jasper.chart.BarChartTest.java

@Override
public void test() {
    super.test();

    numberOfPagesTest(1);// w w  w . j  ava2s .  c  o  m

    JFreeChart chart = getChart("summary.chart1", 0);
    CategoryPlot categoryPlot = chart.getCategoryPlot();
    Assert.assertEquals("renderer", BarRenderer.class, categoryPlot.getRenderer().getClass());
    Assert.assertTrue("show labels", categoryPlot.getRenderer().getBaseItemLabelsVisible());
    Assert.assertFalse("show tick labels", categoryPlot.getDomainAxis().isTickMarksVisible());
    Assert.assertFalse("show tick marks", categoryPlot.getDomainAxis().isTickLabelsVisible());

    chart = getChart("summary.chart2", 0);
    Axis axis = chart.getCategoryPlot().getDomainAxis();
    Assert.assertEquals("category label", "category", axis.getLabel());
    Assert.assertEquals("category label color", Color.BLUE, axis.getLabelPaint());
    Assert.assertEquals("category label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont());
    Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint());
    Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont());
    CategoryLabelPosition labelPosition = chart.getCategoryPlot().getDomainAxis().getCategoryLabelPositions()
            .getLabelPosition(RectangleEdge.LEFT);
    Assert.assertEquals("plot label rotation", (45d / 180) * Math.PI, labelPosition.getAngle());
    Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint());

    chart = getChart("summary.chart3", 0);
    axis = chart.getCategoryPlot().getRangeAxis();
    Assert.assertEquals("value label", "value", axis.getLabel());
    Assert.assertEquals("value label color", Color.BLUE, axis.getLabelPaint());
    Assert.assertEquals("value label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont());
    Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint());
    Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont());
    Assert.assertEquals("tick label mask", "10.00", ((NumberAxis) axis).getNumberFormatOverride().format(10));
    Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint());
    Assert.assertEquals("range min value", 1d, ((ValueAxis) axis).getLowerBound());
    Assert.assertEquals("range max value", 15d, ((ValueAxis) axis).getUpperBound());
}

From source file:net.sf.dynamicreports.test.jasper.chart.StackedBarChartTest.java

@Override
public void test() {
    super.test();

    numberOfPagesTest(1);//w w w.  j a  v a2  s .  com

    JFreeChart chart = getChart("summary.chart1", 0);
    CategoryPlot categoryPlot = chart.getCategoryPlot();
    Assert.assertEquals("renderer", StackedBarRenderer.class, categoryPlot.getRenderer().getClass());
    Assert.assertTrue("show labels", categoryPlot.getRenderer().getBaseItemLabelsVisible());
    Assert.assertFalse("show tick labels", categoryPlot.getDomainAxis().isTickMarksVisible());
    Assert.assertFalse("show tick marks", categoryPlot.getDomainAxis().isTickLabelsVisible());

    chart = getChart("summary.chart2", 0);
    Axis axis = chart.getCategoryPlot().getDomainAxis();
    Assert.assertEquals("category label", "category", axis.getLabel());
    Assert.assertEquals("category label color", Color.BLUE, axis.getLabelPaint());
    Assert.assertEquals("category label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont());
    Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint());
    Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont());
    CategoryLabelPosition labelPosition = chart.getCategoryPlot().getDomainAxis().getCategoryLabelPositions()
            .getLabelPosition(RectangleEdge.LEFT);
    Assert.assertEquals("plot label rotation", (45d / 180) * Math.PI, labelPosition.getAngle());
    Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint());

    chart = getChart("summary.chart3", 0);
    axis = chart.getCategoryPlot().getRangeAxis();
    Assert.assertEquals("value label", "value", axis.getLabel());
    Assert.assertEquals("value label color", Color.BLUE, axis.getLabelPaint());
    Assert.assertEquals("value label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont());
    Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint());
    Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont());
    Assert.assertEquals("tick label mask", "10.00", ((NumberAxis) axis).getNumberFormatOverride().format(10));
    Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint());
    Assert.assertEquals("range min value", 1d, ((ValueAxis) axis).getLowerBound());
    Assert.assertEquals("range max value", 15d, ((ValueAxis) axis).getUpperBound());
}

From source file:net.sf.dynamicreports.test.jasper.chart.WaterfallBarChartTest.java

@Override
public void test() {
    super.test();

    numberOfPagesTest(1);//ww  w .  j  a  v a 2 s.  c om

    JFreeChart chart = getChart("summary.chart1", 0);
    CategoryPlot categoryPlot = chart.getCategoryPlot();
    Assert.assertEquals("renderer", WaterfallBarRenderer.class, categoryPlot.getRenderer().getClass());
    Assert.assertTrue("show labels", categoryPlot.getRenderer().getBaseItemLabelsVisible());
    Assert.assertFalse("show tick labels", categoryPlot.getDomainAxis().isTickMarksVisible());
    Assert.assertFalse("show tick marks", categoryPlot.getDomainAxis().isTickLabelsVisible());

    chart = getChart("summary.chart2", 0);
    Axis axis = chart.getCategoryPlot().getDomainAxis();
    Assert.assertEquals("category label", "category", axis.getLabel());
    Assert.assertEquals("category label color", Color.BLUE, axis.getLabelPaint());
    Assert.assertEquals("category label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont());
    Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint());
    Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont());
    CategoryLabelPosition labelPosition = chart.getCategoryPlot().getDomainAxis().getCategoryLabelPositions()
            .getLabelPosition(RectangleEdge.LEFT);
    Assert.assertEquals("plot label rotation", (45d / 180) * Math.PI, labelPosition.getAngle());
    Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint());

    chart = getChart("summary.chart3", 0);
    axis = chart.getCategoryPlot().getRangeAxis();
    Assert.assertEquals("value label", "value", axis.getLabel());
    Assert.assertEquals("value label color", Color.BLUE, axis.getLabelPaint());
    Assert.assertEquals("value label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont());
    Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint());
    Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont());
    Assert.assertEquals("tick label mask", "10.00", ((NumberAxis) axis).getNumberFormatOverride().format(10));
    Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint());
    Assert.assertEquals("range min value", 1d, ((ValueAxis) axis).getLowerBound());
    Assert.assertEquals("range max value", 15d, ((ValueAxis) axis).getUpperBound());
}

From source file:net.sf.dynamicreports.test.jasper.chart.Bar3DChartTest.java

@Override
public void test() {
    super.test();

    numberOfPagesTest(1);/*from   w w w . j  a va2  s.c  o m*/

    JFreeChart chart = getChart("summary.chart1", 0);
    CategoryPlot categoryPlot = chart.getCategoryPlot();
    Assert.assertEquals("renderer", BarRenderer3D.class, categoryPlot.getRenderer().getClass());
    BarRenderer3D renderer = (BarRenderer3D) categoryPlot.getRenderer();
    Assert.assertTrue("show labels", renderer.getBaseItemLabelsVisible());
    Assert.assertEquals("x offset", 2d, renderer.getXOffset());
    Assert.assertEquals("y offset", 3d, renderer.getYOffset());

    chart = getChart("summary.chart2", 0);
    Axis axis = chart.getCategoryPlot().getDomainAxis();
    Assert.assertEquals("category label", "category", axis.getLabel());
    Assert.assertEquals("category label color", Color.BLUE, axis.getLabelPaint());
    Assert.assertEquals("category label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont());
    Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint());
    Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont());
    CategoryLabelPosition labelPosition = chart.getCategoryPlot().getDomainAxis().getCategoryLabelPositions()
            .getLabelPosition(RectangleEdge.LEFT);
    Assert.assertEquals("plot label rotation", (45d / 180) * Math.PI, labelPosition.getAngle());
    Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint());

    chart = getChart("summary.chart3", 0);
    axis = chart.getCategoryPlot().getRangeAxis();
    Assert.assertEquals("value label", "value", axis.getLabel());
    Assert.assertEquals("value label color", Color.BLUE, axis.getLabelPaint());
    Assert.assertEquals("value label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont());
    Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint());
    Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont());
    Assert.assertEquals("tick label mask", "10.00", ((NumberAxis) axis).getNumberFormatOverride().format(10));
    Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint());
    Assert.assertEquals("range min value", 1d, ((ValueAxis) axis).getLowerBound());
    Assert.assertEquals("range max value", 15d, ((ValueAxis) axis).getUpperBound());
}

From source file:net.sf.dynamicreports.test.jasper.chart.GroupedStackedBarChartTest.java

@Override
public void test() {
    super.test();

    numberOfPagesTest(1);//from  w  w  w. java 2s  .  c  o m

    JFreeChart chart = getChart("summary.chart1", 0);
    CategoryPlot categoryPlot = chart.getCategoryPlot();
    Assert.assertEquals("renderer", GroupedStackedBarRenderer.class, categoryPlot.getRenderer().getClass());
    Assert.assertTrue("show labels", categoryPlot.getRenderer().getBaseItemLabelsVisible());
    Assert.assertFalse("show tick labels", categoryPlot.getDomainAxis().isTickLabelsVisible());
    Assert.assertFalse("show tick marks", categoryPlot.getDomainAxis().isTickMarksVisible());

    chart = getChart("summary.chart2", 0);
    Axis axis = chart.getCategoryPlot().getDomainAxis();
    Assert.assertEquals("category label", "category", axis.getLabel());
    Assert.assertEquals("category label color", Color.BLUE, axis.getLabelPaint());
    Assert.assertEquals("category label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont());
    Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint());
    Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont());
    CategoryLabelPosition labelPosition = chart.getCategoryPlot().getDomainAxis().getCategoryLabelPositions()
            .getLabelPosition(RectangleEdge.LEFT);
    Assert.assertEquals("plot label rotation", (45d / 180) * Math.PI, labelPosition.getAngle());
    Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint());

    chart = getChart("summary.chart3", 0);
    axis = chart.getCategoryPlot().getRangeAxis();
    Assert.assertEquals("value label", "value", axis.getLabel());
    Assert.assertEquals("value label color", Color.BLUE, axis.getLabelPaint());
    Assert.assertEquals("value label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont());
    Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint());
    Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont());
    Assert.assertEquals("tick label mask", "10.00", ((NumberAxis) axis).getNumberFormatOverride().format(10));
    Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint());
    Assert.assertEquals("range min value", 1d, ((ValueAxis) axis).getLowerBound());
    Assert.assertEquals("range max value", 15d, ((ValueAxis) axis).getUpperBound());
}

From source file:net.sf.dynamicreports.test.jasper.chart.StackedBar3DChartTest.java

@Override
public void test() {
    super.test();

    numberOfPagesTest(1);//  w  w w .java 2s  .c  o  m

    JFreeChart chart = getChart("summary.chart1", 0);
    CategoryPlot categoryPlot = chart.getCategoryPlot();
    Assert.assertEquals("renderer", StackedBarRenderer3D.class, categoryPlot.getRenderer().getClass());
    BarRenderer3D renderer = (BarRenderer3D) categoryPlot.getRenderer();
    Assert.assertTrue("show labels", renderer.getBaseItemLabelsVisible());
    Assert.assertEquals("x offset", 2d, renderer.getXOffset());
    Assert.assertEquals("y offset", 3d, renderer.getYOffset());

    chart = getChart("summary.chart2", 0);
    Axis axis = chart.getCategoryPlot().getDomainAxis();
    Assert.assertEquals("category label", "category", axis.getLabel());
    Assert.assertEquals("category label color", Color.BLUE, axis.getLabelPaint());
    Assert.assertEquals("category label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont());
    Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint());
    Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont());
    CategoryLabelPosition labelPosition = chart.getCategoryPlot().getDomainAxis().getCategoryLabelPositions()
            .getLabelPosition(RectangleEdge.LEFT);
    Assert.assertEquals("plot label rotation", (45d / 180) * Math.PI, labelPosition.getAngle());
    Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint());

    chart = getChart("summary.chart3", 0);
    axis = chart.getCategoryPlot().getRangeAxis();
    Assert.assertEquals("value label", "value", axis.getLabel());
    Assert.assertEquals("value label color", Color.BLUE, axis.getLabelPaint());
    Assert.assertEquals("value label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont());
    Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint());
    Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont());
    Assert.assertEquals("tick label mask", "10.00", ((NumberAxis) axis).getNumberFormatOverride().format(10));
    Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint());
    Assert.assertEquals("range min value", 1d, ((ValueAxis) axis).getLowerBound());
    Assert.assertEquals("range max value", 15d, ((ValueAxis) axis).getUpperBound());
}

From source file:net.sf.dynamicreports.test.jasper.chart.GanttChartTest.java

@Override
public void test() {
    super.test();

    numberOfPagesTest(1);//  w  ww  .  j a  va 2  s. c o  m

    JFreeChart chart = getChart("summary.chart1", 0);
    CategoryPlot categoryPlot = chart.getCategoryPlot();
    Assert.assertEquals("renderer", GanttRenderer.class, categoryPlot.getRenderer().getClass());
    Assert.assertTrue("show labels", categoryPlot.getRenderer().getBaseItemLabelsVisible());
    Assert.assertFalse("show tick labels", categoryPlot.getDomainAxis().isTickMarksVisible());
    Assert.assertFalse("show tick marks", categoryPlot.getDomainAxis().isTickLabelsVisible());
    ganttChartDataTest(chart, "label", new String[] { "task1", "task2", "task3" },
            new Object[][] { { toDate(2011, 1, 1), toDate(2011, 1, 8), 1d },
                    { toDate(2011, 1, 10), toDate(2011, 1, 15), 0.5d },
                    { toDate(2011, 1, 15), toDate(2011, 1, 25), 0.8d } });
    ganttChartDataTest(chart, "serie1", new String[] { "task1", "task2", "task3" },
            new Object[][] { { toDate(2011, 1, 2), toDate(2011, 1, 9), null },
                    { toDate(2011, 1, 8), toDate(2011, 1, 14), null },
                    { toDate(2011, 1, 16), toDate(2011, 1, 20), null } });

    chart = getChart("summary.chart2", 0);
    Axis axis = chart.getCategoryPlot().getDomainAxis();
    Assert.assertEquals("task label", "task", axis.getLabel());
    Assert.assertEquals("task label color", Color.BLUE, axis.getLabelPaint());
    Assert.assertEquals("task label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont());
    Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint());
    Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont());
    CategoryLabelPosition labelPosition = chart.getCategoryPlot().getDomainAxis().getCategoryLabelPositions()
            .getLabelPosition(RectangleEdge.LEFT);
    Assert.assertEquals("plot label rotation", (45d / 180) * Math.PI, labelPosition.getAngle());
    Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint());

    chart = getChart("summary.chart3", 0);
    axis = chart.getCategoryPlot().getRangeAxis();
    Assert.assertEquals("time label", "time", axis.getLabel());
    Assert.assertEquals("time label color", Color.BLUE, axis.getLabelPaint());
    Assert.assertEquals("time label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont());
    Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint());
    Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont());
    Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint());
}