// Create a XYChart object of size 700 x 450 pixels
XYChart c = new XYChart(700, 450);
// Set the plotarea at (30, 20) and of size 200 x 200 pixels
c.setPlotArea(120, 70, 520, 270);
// Add a line chart layer using the given data
c.addLineLayer(data, -1, "XXXX 走势图");
// Display 1 out of 3 labels on the x-axis.
c.xAxis().setLabelStep(1);
c.setBackground(0xFFFF80, 0x0, 1);
c.setPlotArea(120, 70, 520, 270, 0xFFFFFF, -1, -1, 0xC0C0C0, -1);
c.addLegend(400, 35, false, "simsun.ttc", 10).setBackground(0xFFFF80);
|