I am using a scatter chart and I was wanting to manually add individual nodes (points) instead of data binding. I figured out how to do it with splinechart, but scatterchart does not like series. And i can not figure out how to add nodes without using something like this :
Infragistics::UltraChart::Resources::Appearance::NumericSeries^ series = gcnew Infragistics::UltraChart::Resources::Appearance::NumericSeries();
series->Points->Add(gcnew Infragistics::UltraChart::Resources::Appearance::NumericDataPoint(values[j], times[j].ToString()->Substring(0,8), false));
series->Label = s;
ucLineChart->Series->Add(series);
Like i said, this works perfectly for spline charts but my only issue is that i need to show varying distances between points on the x-axis, so i was wanting to implement this code while using a scatter chart but apparently they do not support series, so how would i go about programtically adding nodes to a single line?
Thanks!!!
For the ScatterChart you can use XYSeries or NumericTimeSeries series.
That definitely is getting me going in the right direct thanks!! My next issue is, i want it to use a window idea that can be moved with time (x-axis) So i figured somethign like this should do the trick but it doesnt.
ucLineChart->Axis->X->RangeMin = min;
ucLineChart->Axis->X->RangeMax = max;
I want it to keep that window even if there is no point at "max".
Also, how do i change the type of line it is using? Im using a scatterchart and the line looks like bezier curve, but i would like to see some other types. I'm using:
ucLineChart->ScatterChart->ConnectWithLines = true;
My final question is how do i grab the x value of a point in a chartdatadoubleclicked event? ( I am using XYseries) I figured it would be like this:
double Time= Double::Parse(ucLineChart->Series[e->DataRow]->GetPoints()[e->DataColumn]->X;
Thank you for your time and after these three issues are correct, i will be finished! (=
1.
this.UltraChart1.Axis.X.RangeType = AxisRangeType.Custom;
this.UltraChart1.Axis.X.RangeMin = min;
this.UltraChart1.Axis.X.RangeMax = max;
2.
this.UltraChart1.ScatterChart.ConnectWithLines = true;
this.UltraChart1.ScatterChart.LineAppearance.SplineTension = 0;
3. You can find your x-value using e.DataRow and e.DataColumn