2

I have to plot a line chart with the range of X and Y axis is in real numbers(eg.-n to n which are float values).How can i manually set the values.And this should be the dynamic chart.Actually im getting the data from the serial port frequently.Thanks in advance.

Mukthi
  • 561
  • 4
  • 13
  • 35

1 Answers1

1

Revised to reflect XY requirement.

Using , here's a basic example of ChartFactory.createXYLineChart() that demonstrates adding and removing XYDatasets. As you want to add XY pairs individually, create the chart with an XYSeriesCollection consisting of one or more XYSeries. Here's a related example that adds data dynamically to a scatter plot.

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045
  • Thanks for your reply.Im working with this only but how can i plot the X and Y axis values as per my requirements i.e both x and y axis values are in float(-n to n).And in the time series charts X axis is having date values,but i need it to be in float. – Mukthi Aug 31 '11 at 05:49
  • Ah, I incorrectly assumed a time domain; I've suggested an alternate approach above. – trashgod Aug 31 '11 at 10:13