Jump to content
Software FX Community

Problems with CURVE charts

User (Legacy)

Recommended Posts

Hi there,

I havethe following data set into the chart

\ X


| 1 2 3 4 5 6

| 1 2 3 4 5 nan

Z| 1 2 3 4 nan nan

| 1 2 3 nan nan nan

| 1 2 nan nan nan nan

Setting this data with the code (VC++) shown below: I could not reproduce

this in VB because of the lack of VB to have a NaN.

Using now a line chart, the picture in attachment LINECHART.JPG is produced

(rotated a bit to see the lines properly).

Using a curve chart, the picture in attachment CURVECHART is produced (also

rotated a bit)

Since NaN is a valid double value I expect the handling of this (very

special) value correctly. For me it looks like that the curve calculating

routine tries to use the values and calculates something, which obvioulsy

fails if there is a nan in there. Can that be fixed? What other alternatives

do I have in order to hide a single riser?? The NaN is working fine to hide

the riser, unless you have a curved chart.


Stephan Klaffer

DecisionWorks Ltd.

London / UK

double nan = pow(-1, 0.5);

chart->OpenDataEx(1, 5, 6);

chart->GetSeries().GetItem(0).SetYvalue(0, 1);

chart->GetSeries().GetItem(1).SetYvalue(0, 1);

chart->GetSeries().GetItem(2).SetYvalue(0, 1);

chart->GetSeries().GetItem(3).SetYvalue(0, 1);

chart->GetSeries().GetItem(4).SetYvalue(0, 1);

chart->GetSeries().GetItem(0).SetYvalue(1, 2);

chart->GetSeries().GetItem(1).SetYvalue(1, 2);

chart->GetSeries().GetItem(2).SetYvalue(1, 2);

chart->GetSeries().GetItem(3).SetYvalue(1, 2);

chart->GetSeries().GetItem(4).SetYvalue(1, 2);

chart->GetSeries().GetItem(0).SetYvalue(2, 3);

chart->GetSeries().GetItem(1).SetYvalue(2, 3);

chart->GetSeries().GetItem(2).SetYvalue(2, 3);

chart->GetSeries().GetItem(3).SetYvalue(2, 3);

chart->GetSeries().GetItem(4).SetYvalue(2, nan);

chart->GetSeries().GetItem(0).SetYvalue(3, 4);

chart->GetSeries().GetItem(1).SetYvalue(3, 4);

chart->GetSeries().GetItem(2).SetYvalue(3, 4);

chart->GetSeries().GetItem(3).SetYvalue(3, nan);

chart->GetSeries().GetItem(4).SetYvalue(3, nan);

chart->GetSeries().GetItem(0).SetYvalue(4, 5);

chart->GetSeries().GetItem(1).SetYvalue(4, 5);

chart->GetSeries().GetItem(2).SetYvalue(4, nan);

chart->GetSeries().GetItem(3).SetYvalue(4, nan);

chart->GetSeries().GetItem(4).SetYvalue(4, nan);

chart->GetSeries().GetItem(0).SetYvalue(5, 6);

chart->GetSeries().GetItem(1).SetYvalue(5, nan);

chart->GetSeries().GetItem(2).SetYvalue(5, nan);

chart->GetSeries().GetItem(3).SetYvalue(5, nan);

chart->GetSeries().GetItem(4).SetYvalue(5, nan);



Link to comment
Share on other sites


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

  • Create New...