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
1052
Data Point Colour using DataMapping
posted

Hi,

I am using a XamWebGrid to provide a bubble chart. I am binding series to a List of a custom class I have created, so that my ViewModel is decoupled from Infragistics.

My class looks like this:

    public class ChartPoint
    {
        public object ValueX { getset; }
        public object ValueY { getset; }
        public object Radius { getset; }
        public Brush PointBrush { getset; }
 
        public ChartPoint(object valueX, object valueY, object radius, Brush pointBrush)
        {
            ValueX = valueX;
            ValueY = valueY;
            Radius = radius;
            PointBrush = pointBrush;
        }
    }
Then in my series I have set a DataMapping to be:
DataMapping = "ValueX = ValueX; ValueY = ValueY; Radius = Radius"
This all works fine, however I am wanting to be able to change the colours of each point and was hoping that  I could just change my mapping to something like:
DataMapping = "ValueX = ValueX; ValueY = ValueY; Radius = Radius; Fill = PointBrush"
However when I run this I get the error "Data Binding Error - Wrong Data Point value."
Is there some way to set the DataPoints Fill without having to know about the DataPoint class?

Thanks