I have created a chart which uses XYBlockRenerer which looks like this:

And I have list of check box with each series name next to it however when i uncheck a check box using this code
Code: Select all
XYBlockRenderer renderer =(XYBlockRenderer) inFocus.getXYPlot().getRenderer();
renderer.setSeriesVisible(0, Boolean.FALSE);
Dose anyone have any idea on how to remove series from XYZDataset ?
and one more thing as u c in the image my data wont fit the plot area there is white gap between y axis and my series. im using these codes but wont work?
Code: Select all
NumberAxis xAxis = new NumberAxis("X");
xAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
xAxis.setLowerMargin(4.0);
xAxis.setUpperMargin(0.0);
NumberAxis yAxis = new NumberAxis("Y");
yAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
yAxis.setLowerMargin(0.0);
yAxis.setUpperMargin(0.0);