gpt4 book ai didi

flutter - 如何更改图表的标签颜色

转载 作者:IT王子 更新时间:2023-10-29 07:15:50 24 4
gpt4 key购买 nike

我想改变图表的标签颜色。

我正在使用谷歌的图表库 ( https://github.com/google/charts )。

enter image description here

最佳答案

您可以使用 axis 更改颜色

var axis = charts.NumericAxisSpec(
renderSpec: charts.GridlineRendererSpec(
labelStyle: charts.TextStyleSpec(
fontSize: 10, color: charts.MaterialPalette.white), //chnage white color as per your requirement.
));

并在图中定义

primaryMeasureAxis: axis,
domainAxis: axis,

关于flutter - 如何更改图表的标签颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57425649/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com