0

I'm currently using MS Chart Control. And in this object i have 2 series: Balance and Volume. Data to

foreach (double balance in grStats.getChangedBalance())
{
    chartBalanceAndVolume.Series["Balance"].Points.Add(new DataPoint(0, balance));
}

added succesfully. But if i write as

int index = 1;
foreach (double volume in grStats.getVolumes())
{
    chartBalanceAndVolume.Series["Volume"].Points.Add(new DataPoint(index, volume));
    index++;
}

this leads to the addition of the values ​​in the chart "Balance". Why is that?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Relrin
  • 760
  • 2
  • 10
  • 28
  • 1
    Not sure as what you mean the X value would show all of them in this case i guess starting from 0 to index (whatever the number of records are there) – V4Vendetta Apr 02 '13 at 08:24
  • Each chart can contain several series, all of which are drawn in the same chart area. Is that what you are seeing? Did you want it drawn in a separate chart area? – Matthew Watson Apr 02 '13 at 08:29
  • @V4Vendetta No, the problem is not there.Especially checked this "defect" – Relrin Apr 02 '13 at 08:30
  • @MatthewWatson I want to draw two charts at one place – Relrin Apr 02 '13 at 08:31
  • @MatthewWatson Divide into 2 parts of my main chart get a similar result – Relrin Apr 02 '13 at 08:52
  • Both Series are probalby sitting in the same ChartArea. Without knowing more, like the ChartType we cn't know.. – TaW Aug 27 '16 at 11:57

0 Answers0