gpt4 book ai didi

ruby-on-rails - 样式echarts - 无法修改标题颜色

转载 作者:行者123 更新时间:2023-12-03 08:55:37 24 4
gpt4 key购买 nike

希望使用下面的图表,但无法将标题颜色更改为白色,并将轴和轴编号更改为灰色(或白色)。这应该高于深色背景。有人知道如何用echarts改变标题颜色吗?

<script type="text/javascript">
// based on prepared DOM, initialize echarts instance
var myChart = echarts.init(document.getElementById('main'));

// specify chart configuration item and data
var option = {
title: {
text: 'Total memebers of the club',
fontColor: 'white',
display: true,
position: 'bottom'

},
tooltip: {},
legend: {
data: ['Total member']
},
xAxis: {

data: ["11/2018", "12/2018", "01/2019", "02/2019", "03/2019", "04/2019"]
},
yAxis: {},
series: [{
itemStyle: {normal: {color: 'white'}},
name: 'Total',
type: 'bar',
data: [5, 384, 612, 2344, 4670, 9372]
}]
};

// use configuration item and data specified to show chart
myChart.setOption(option);
</script>

最佳答案

尝试一下。将其添加到“文本:”下,例如:

text: 'Total memebers of the club',
textStyle: {
color: '#ed2d2e'
}

关于ruby-on-rails - 样式echarts - 无法修改标题颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55627466/

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