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
|
Hello We are using WPF Elements 6.0.2734.23168. I want to change the color of my alternative y-axes in our Chart. I'm able to change the title color of my axis by settings the background color. I've tried setting the foreground color and the border brush. But nothing happens. How can I change the color of the axis line,tick marks and values? Best regards Nicklas |
|
|
Hello Nicklas Setting the Foreground of an alternative Y axis is setting the color of the labels and title for me. If this does not work at your end, you can set the LabelTemplate property of the axis to be a DataTemplate containing a TextBlock with the size and foreground that you want for the labels. The Text can bind to FormattedLabel. For the axis line and tick marks, you can set the AxisLineStyle and MajorTickMarkStyle properties of ChartAxis. These can both be a style targeting Border with a single setter for the Background property. You may be able to create a single style that sets the Background property using an AncestorType binding to grab the Foreground value from the ChartAxis. That way, you'd only need to create a single style to apply to all alternative Y axis instances, rather than a different colored style for each one. For examples of styling each part of a Chart control, you can see the Custom Chart Style demo in the Chart/Features category of the SampleExplorer app. Let me know if you have any questions about this. -Jason Fauchelle |
|