Multiple Y values per X in a Point chart RRS feed

  • Question

  • NOTE:  the Related Topics I've been given are worse than useless - they wasted my time examining them.

    I'm trying to build a Point chart where I plot, for each day in a range of dates, one or more values indicating the time a particular event took place.  I duly tried both Series.AddY(Object[])  and Series.AddXY(Object, Object[]), but was given an error message each time: 

    Series data points do not support values of type System.Double[] only values of these types can be used: Double, Decimal, Single, int, long, uint, ulong, String, DateTime, short, ushort.

    When I tried adding points singly by using AddXY(double, double) or AddY(double) I was told that I couldn't add more than one Y value this way. I'm evaluating MS Chart as a replacement for a COM graphics server that won't work in II6 native mode, but that component, even though the company that made it is dead and gone, still managed to plot multiple Y values for each X value. Does this have to be done with data binding? and, btw, why bother documenting a method that does not work?
    Friday, December 11, 2009 2:31 AM


All replies

  • Some MS Chart chart types (Stock, Bubble, ...) require multiple Y values. Point chart type only supports a single Y value and you will need to create multiple data points with same X value and different Y values.

    Friday, December 11, 2009 2:39 AM
  • Thanks.  This still leaves me some problems in making the axis labels work, but that would be a separate question :)  I really appreciate it, I was looking at days of work gone for nothing...and having the answer BEFORE I had to email my boss is particularly nice.  Have a good night.
    Friday, December 11, 2009 3:14 AM