How to change x and y axis's black text color? I have tried changing every black color in every xaml file in WinRTXamlToolkit.Controls.DataVisualization namespace. Any suggestion is highly appreciated.
Asked
Active
Viewed 158 times
1 Answers
1
If you Ctrl+Shift in the sample app - you'll see the TextBlock
is inside of a NumericAxisLabel
and when you search the code - you can see that it's created by NumericAxis.CreateAxisLabel()
. One of its base classes - DisplayAxis
has a AxisLabelStyle
property you can use to apply a style to that label, so if you set that in your chart - you can use a style that specifies a setter for the Foreground
property with a different brush.

Filip Skakun
- 31,624
- 6
- 74
- 100
-
Thanks. Really helped but it only changed foregrounds of y-axis and not for x-axis. How do I change x-axis also? – lbrahim Jan 13 '15 at 09:35
-
Can you post your XAML? – Filip Skakun Jan 13 '15 at 18:11
-
Thanks but I finally solved it by setting IndependentAxis of the series to a CategoryAxis along with setting custom styles. Lots of head scratching. – lbrahim Jan 14 '15 at 14:51