I really like the "Luminol" theme, but when I use it, the theme overrides my Y axis formatting. I was originally setting the formatting in code using this:
Axis yAxis = new Axis();
yAxis.AxisType = AxisType.PrimaryY;
yAxis.Label.Format = "{0:n0}";
DataChart.Axes.Add(yAxis);
When I try using the "Luminol" theme, I lose the formatting on the Y axis and my numbers appear with no comma separators.
I've also tried setting the format in the XAML like this:
<igCA:XamChart x:Name="DataChart" Theme="Luminol">
<igCA:XamChart.Axes>
<igCA:Axis AxisType="PrimaryY">
<igCA:Axis.Label>
<igCA:Label Angle="-45" Format="{}{0:n0}" />
</igCA:Axis.Label>
</igCA:Axis>
</igCA:XamChart.Axes>
</igCA:XamChart>
By setting the format in the XAML, the numbers on my Y axis appear with the proper formatting, but I lose the color from the "Luminol" theme. In other words, the Y axis labels are black rather than the color set by "Luminol".
Is there a way to get both the formatting right and the theme color right?
Thanks, Steve
You can keep the color with:
<igChart:Label Angle="-45" Format="{}{0:n0}" Foreground="{StaticResource LabelYBrush}" />
When I first paste that into the xaml, the label in the designer does change to the proper color. However, as soon as I try to build the project, the designer unloads with an error. The exact error in the IDE is "StaticResource reference 'LabelYBrush' was not found".