最近做数据可视化,一直跟图表打交道,遇到了一个修改 图例(legend)及轴上文字的颜色及大小的需求
legend: { left: 'left', data: ['2的指数', '3的指数'], textStyle: { color: 'red', fontSize: 18 } }, xAxis: { type: 'category', name: 'x', splitLine: {show: false}, data: ['一', '二', '三', '四', '五', '六', '七', '八', '九'], axisLabel: { show: true, textStyle: { color: 'red' } } },
修改后效果如下: