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 { get; set; } public object ValueY { get; set; } public object Radius { get; set; } public Brush PointBrush { get; set; } 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
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
Hi mtatgl,
I scoured through our forums and found this:
http://forums.infragistics.com/forums/p/36345/211443.aspx#
I believe the code that Graham provided (while more complicated than doing a simple DataMapping), is definitely the answer you're looking for.
Hope this helps,
Marisa