Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
570
Is there someway I can tie each axis of chart to a object with values in an array.
posted

Like the structure behind point is

public class SimpleDataPoint    {

                    public static int Count = 4; //Some restiction

        public DateTime xAxis { getset; }

        public float[] yAxis { getset; }

}

And I am trying to create axis and bind dynamically as

  for (int i = 0; i < SimpleDataPoint.Count; i++)
    {
       LineSeries xmSeries = new LineSeries();
       xmSeries.ValueMemberPath = "{yAxis[" +i.ToString() + "]}";
       xmSeries.XAxis = xmXAxis;
.....
}
This does not seem to work. What should be ValueMemberPath.
Or is there someother way
Parents
  • 30692
    Suggested Answer
    Offline posted

    The member paths do no currently support indexers like a standard Silverlight binding. The upside is that they are much more efficient than the standard bindings when you are dealing with mass amounts of data. If the indexer support would be useful for your scenario I would suggest making a feature request.

    In the meantime I would suggest creating a seperate property per value which you want to plot, or a seperate collection of values per series. You could even create an object that automatically turns your source collection into multiple collections to bind to each separate series.

    Does this help?

    -Graham

Reply Children