The XamChart docs state that for a ScatterLine chart:
It is recommended that the numeric columns contain 2 or more rows so that a line can be drawn between two data points
From: ms-help://NetAdvantage_WPF92/NAWPF_WPF92/WPF/xamChart_Scatter_Line_Chart.html
However, I find that if you try to draw a scatter line chart and only provide a single data point, you get a nasty error message (XamChart Warning: The scatter chart needs ValueX and ValueY. The values have to be set for every data point using ChartParameters collection.) Note that the point is fine, it's just that there is only one point (which is not recommended, but it's all the data I have).
I have run into this in two places. In the first I was manually adding the data points, so I simply checked for a count of one, and added a duplicate point and all was well.
But in the second place, I'm using data binding so my opportunities to get in and fudge the data are limited.
Is there any way to make XamChart behave like the docs say it should behave? Drawing just one marker is fine.
Thanks,
Mike
Thanks for your suggestions. We agree with them. We’ll try fixing this too.
Just a follow up question to that effect. Why is it that Series that are of ChartType Line can be rendered with 0 or even 1 points, but ChartType ScatterLine throws exception if there are 0 points or 1 point?
I understand that you will be fixing the problem for only 1 point in the next service release. However, an exception is thrown if there are 0 points. Can you please fix that as well? Thanks in advance.
Sorry, I didn't see that is ScatterLine chart.
There is an issue when the point is only one. We fixed it. The fix will be available in next service release.
Try that with a ScatterLine.
We're still using 9.2, but will be going to 10.1 shortly. Sooner if this actually is fixed in 10.1.
I’ve been trying this code:
<igCA:XamChart x:Name="xamChart" DrawException="False">
<igCA:XamChart.Series>
<igCA:Series ChartType="Scatter">
<igCA:Series.DataPoints>
<igCA:DataPoint>
<igCA:DataPoint.ChartParameters>
<igCA:ChartParameter Type="ValueX" Value="5" />
<igCA:ChartParameter Type="ValueY" Value="5" />
</igCA:DataPoint.ChartParameters>
</igCA:DataPoint>
</igCA:Series.DataPoints>
</igCA:Series>
</igCA:XamChart.Series>
</igCA:XamChart>
and it works. Which version you are using? Can you apply the latest service release and try it again.