This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
How can I change a column color within a series (one barseries)? Thanks! |
|
|
The Sample Explorer has an example of one way to do this; by providing a converter that can set the Background of a bar based upon its point's value - look for the Data Dependent Chart Style Demo (SampleExplorer/Demos/Charts/Features/DataDependentChartStyleDemo.xaml). Essentially what you need to do is create a converter that in its method Convert will return a SolidColorBrush based upon whatever logic you specify. In the above demo we use the ValueToBrushConverter to do this (it's in C# but the concept is the same for VB). In your page's ResourceDictionary create a instance of your converter, then create a Style targeting the Bar type. Inside its ControlTemplate set the Background property of a Border instance to bind to whatever value you want to pass to your converter, then specify that converter. The markup could look something like this:
Then on your BarSeries set its BarStyle to use that StaticResource. I hope I've understood your request, if you want any further clarification feel free to ask. |
|