I am using the .NET Windows Forms Microsoft Chart Component.
My data objects would look like more evolved versions of the following class:
class DataObject {
public double ValueX {get;}
public double ValueY {get;}
public boolean IsRed {get;}
}
I have been able to bind my chart to my data by setting the Chart.dataSource property to an ICollection of DataObject. I have also been able to configure a Series that has X = valueX and Y = valueY.
Now I want to (for example) give a special color to the points in the series depending on the value of IsRed.
What would be the best way to achieve that in Visual Studio 2008/2010?
It didn’t make sense to continue databinding when the need is so complex – so I simply put the points in the chart by using the
addPointmethods.That way I can change each point’s formatting as I wish.