Now I have another problem.
I have 2 charts on the page, each should be a scatter chart (i.e. markers without lines), and the labels are strings. Number of points is around 1000 for each chart.
So I'm using LineSeries with CategoryXAxis, with some dummy points with value set to double.NaN.
The problem is that not all points are being displayed (as explained elsewhere on the forum, this is due to performance customization), even if I set series.Resolution property to 0.
Before I was using ScatterSeries, and since a CategoryXAxis cannot be assigned to it, I was keeping a list of labels (List<string>) and was doing the same trick as with using NumericAxis to display DateTime data, i.e. a DataTemplate with a textblock and a converter. The converter would use a value passed as a key to the list of labels to retrieve and draw the axis label. The problem with this approach is that inside the Converter it's only the value which is accessible, so I cannot access the list of labels. When there was only 1 chart on the page, I just made this list static, but with 2 charts it obviously doesn't work.
So, I'm a bit stuck.
To summarize: I need a scatter chart with 1000 points and string labels.I cannot use LineSeries, because it would exclude some points from being drawn.I cannot use ScatterSeries, because I cannot attach a CategoryXAxis to it, and the trick with assigning a DataTemplate with TextBlock and Converter to the XAxis.Label wouldn't work, since there are 2 charts, and I cannot access the chart's list of labels from the Converter.
Can you help me on this one?
I have a question, It includes some empty space at the beginning and at the end... is it normal? like if there is a space till the graphic starts
Found this... and works perfect!!
Link
Hi! I am at the same situation here, I want to display multiple data for the same value of X. I have numerical value at Y and Dates at X. I was looking for a way to use scatter series instead of Linear series...
I don't understand the way we can introduce the new values dynamically to the list to be shown at X axis when I update the values from my BBDD.
Thanks, I will try that when we get back to that (if ever, for now I seem to have managed to evade this:) ), and then would mark the question as answered
You can provide the values collection at runtime also, this would be just one way of achieving that:
((StringLookupConverter)Resources["lookupConverter"]).Values = new List<string>() { "A", "B", "C", "D", "E", "F", "G" };
-Graham