小编il *_*ino的帖子

如何设置实时图表的标签颜色?

我有一个基于 materialdesigninxaml 框架的应用程序,我可以在其中设置浅色和深色,设置浅色后我可以正确看到黑色的标签文本,但是当我设置深色主题时,图表的标签仍然保留黑色,所以我什么也看不见。这是我的图表:

 <lvc:CartesianChart Series="{Binding}" LegendLocation="Bottom">
       <lvc:CartesianChart.AxisY>
           <lvc:Axis Labels="{Binding AnalysisController.Labels}"/>
       </lvc:CartesianChart.AxisY>
 </lvc:CartesianChart>
Run Code Online (Sandbox Code Playgroud)

我尝试按照文档的建议将其添加到我的 App.xaml 中:

<ResourceDictionary Source="pack://application:,,,/LiveCharts.Wpf;component/Themes/Colors/white.xaml" />
Run Code Online (Sandbox Code Playgroud)

但文字的颜色仍然是黑色

wpf xaml material-design-in-xaml livecharts

4
推荐指数
1
解决办法
3667
查看次数

标签 统计

livecharts ×1

material-design-in-xaml ×1

wpf ×1

xaml ×1