我需要你的帮助。我正在用qml做一个ChartView,我不能设置字体大小。我看了文件,但没有找到任何解决办法。
有设置图例字体大小的方法吗??
ChartView {
id:chartView
title: "Haccp Data"
theme: ChartView.ChartThemeDark
backgroundColor: "black";
width: parent.width;
height: parent.height
anchors.fill: parent
antialiasing: true;
visible: true
legend.markerShape: Legend.MarkerShapeCircle
....
}
我看到这里有一处房产:
legend.font: Font.pointSize(8) //例如
但是改变这个属性值没有任何影响。有什么建议吗?
谢谢
发布于 2017-11-22 10:11:36
发布于 2019-07-11 15:13:13
注意,直截了当的
legend.font.pointSize: 120
当您指定了图表的主题时,就不起作用了,正如在最初的问题中所做的那样。
在这种情况下,
Component.onCompleted...
@derM建议的方法是我发现的唯一可行的解决方法。谢谢@derM。
https://stackoverflow.com/questions/47416965
复制相似问题