PiePlot extends AbstractPlot implements Navigable { public static DataSource createPieData(DataSource data) { return new PieData(data); } PiePlot(DataSource data); @Override void autoscaleAxis(String axisName); @Override void add(int index, DataSource source, boolean visible); PointRenderer getPointRenderer(DataSource s); void setPointRenderer(DataSource s, PointRenderer pointRenderer); Navigator getNavigator(); static DataSource createPieData(DataSource data); Point2D getCenter(); void setCenter(Point2D center); double getRadius(); void setRadius(double radius); double getStart(); void setStart(double start); boolean isClockwise(); void setClockwise(boolean clockwise); static final String AXIS_TANGENTIAL; }
@Test public void testCreatePieDataReplacesNumericColumnWithTwoDoubleAndOneIntegerColumns() { DataSource data = new DataTable(Integer.class); DataSource pieData = PiePlot.createPieData(data); assertArrayEquals(new Class[] {Double.class, Double.class, Boolean.class}, pieData.getColumnTypes()); }