折線圖,配置Y軸最小間隔為整數,刻度起始不會強制從0開始
yAxis: { minInterval: 1, // 整數 scale: true, // y軸資料,根據資料的最大最小值進行計算 },
設定Y軸分割線虛線
yAxis: { type: 'value', name: "Nitrogen dioxide(ppb)", axisLine: { show: true, lineStyle: { color: 'black' //左側顯示線 } }, splitLine: { show: true, lineStyle: { type: 'dashed', // Y軸分割線 虛線,默認實線 color: 'grey' } }, axisLabel: { fontSize: 14 } },
設定漸變色
(https://gallery.echartsjs.com/editor.html?c=xtnmUAK2r)
color: { type: 'linear', x: 1, y: 0, x2: 0.5, y2: 1, colorStops: [{ offset: 1, color: 'rgba(68, 145, 253, 0)' }, { offset: 0.5, color: 'rgba(68, 145, 253, .5)' }, { offset: 0, color: 'rgba(68, 145, 253, 1)' }], globalCoord: false },
參考:
https://echarts.apache.org/zh/option.html#yAxis.scale
術語速查手冊
https://echarts.apache.org/zh/cheat-sheet.html
立體柱狀圖:
https://gallery.echartsjs.com/editor.html?c=x0ou4zifid

轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/192292.html
標籤:其他
上一篇:強制換行
下一篇:強制換行
