希望与下表配合使用,但无法将标题颜色更改为白色,并且将轴和轴编号更改为灰色(或白色)。这应该超过黑暗的背景。有人知道如何使用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>
答案 0 :(得分:0)
尝试一下。将其添加到“文本:”下,例如:
text: 'Total memebers of the club',
textStyle: {
color: '#ed2d2e'
}