希望使用以下图表,但无法将标题颜色更改为白色,将轴和轴编号更改为灰色(或白色(。这应该高于深色背景。有谁知道如何用电子图表更改标题颜色?
<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'
}