4

I have an application based on materialdesigninxaml framework where I can set the light and the dark color, when the light color is setted I can see correctly the label text which is black, but when I set the dark theme the label of the charts still remain black, so I don't see anything. This is my chart:

 <lvc:CartesianChart Series="{Binding}" LegendLocation="Bottom">
       <lvc:CartesianChart.AxisY>
           <lvc:Axis Labels="{Binding AnalysisController.Labels}"/>
       </lvc:CartesianChart.AxisY>
 </lvc:CartesianChart>

I tried to add this to my App.xaml as suggested by the documentation:

<ResourceDictionary Source="pack://application:,,,/LiveCharts.Wpf;component/Themes/Colors/white.xaml" />

but the color of the text is still black

Yvonnila
  • 635
  • 1
  • 5
  • 22
il santino
  • 117
  • 3
  • 8

1 Answers1

6

You can set the Foreground of your axis to another color like this:

<lvc:CartesianChart Series="{Binding}" LegendLocation="Bottom">
    <lvc:CartesianChart.AxisY>
        <lvc:Axis Labels="{Binding AnalysisController.Labels}"
                  Foreground="White"/>
    </lvc:CartesianChart.AxisY>
</lvc:CartesianChart>
Yvonnila
  • 635
  • 1
  • 5
  • 22