EDIT I rewrote my question to make it clearer after talking below with Tony (thanks!).
PURPOSE To display several lines (for example, 2) in one diagram. Graphs have different pairs of x / y values. For one x-value, I do not know both y-values.
I am using Silverlight. SerialChart and LineGraph classes are available for this. The data source for both charts is the same and is set at the SerialChart level. The property name for the x axis is also defined there for both plots ( CategoryValueMemberPath ).
As suggested in the amCharts documentation, we need to create objects that have a property for the category axis (x axis), and then one property per graph. Let them be called "Graph1" and "Graph2". So the data source looks something like this:
List<MyClass> data = new List<MyClass>() { new MyClass() { Category = 0.1, Graph1 = 0.14, Graph2 = ??? } ,new MyClass() { Category = 0.15, Graph1 = ???, Graph2 = 0.05 } ,new MyClass() { Category = 0.2, Graph1 = 0.35, Graph2 = ??? } ,new MyClass() { Category = 0.18, Graph1 = ???, Graph2 = 0.12 } ... and so on ... }
PROBLEM What should I do with "???" values? I have no actual value for this graph for this category value.
If I do not set the value, the default value is assumed to be 0.0, and it picks up a burst along the x axis. If I set the previously known value Graph1 / Graph2, then it creates a horizontal connection where there should not be one. I basically change the schedule, which leads to the wrong result.
So how can I solve this? I get the feeling that amCharts do not support this scenario.
Wolfgang
source share