Logo Search packages:      
Sourcecode: libjfreechart-java version File versions  Download package

static JFreeChart org::jfree::chart::junit::BarChartTests::createBarChart (  )  [inline, static, private]

Create a bar chart with sample data in the range -3 to +3.

Returns:
The chart.

Definition at line 189 of file BarChartTests.java.

Referenced by setUp().

                                               {

        // create a dataset...
        Number[][] data = new Integer[][]
            {{new Integer(-3), new Integer(-2)},
             {new Integer(-1), new Integer(1)},
             {new Integer(2), new Integer(3)}};

        CategoryDataset dataset = DatasetUtilities.createCategoryDataset("S", 
                "C", data);

        // create the chart...
        return ChartFactory.createBarChart(
            "Bar Chart",
            "Domain", "Range",
            dataset,
            PlotOrientation.HORIZONTAL,
            true,     // include legend
            true,
            true
        );

    }


Generated by  Doxygen 1.6.0   Back to index