Jump to content
Software FX Community

Line Graph - X-Axis - Empty Space Before First Point, After Last Point


bfollek

Recommended Posts

You need to have an XY chart; in other words, your chart right now is using a categorical axis and in order to get the desired graph, your chart needs to use a numerical axis. To do this, you can simple set XValues for your chart. You can do something like the following:

chart1.openData(COD.XVALUES, 1, 10);

chart1.openData(COD.VALUES, 1, 10);

int i = 0;

for (int j = 0;j<10;j++)

 {

chart1.getValue().setItem(0, j, r.nextDouble()  * 50);

chart1.getXValue().setItem(0, j, i);

i++;

 }

chart1.closeData(COD.VALUES);

chart1.closeData(COD.XVALUES);

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...