echarts图表模型属性配置 (仅个人项目使用)
文章目录
//配置代码
return {
tooltip: {
trigger: 'axis'
},
legend: {
data: this.state.legend_total,
y: 'bottom'
},
grid: {
left: '4%',
right: '4%',
bottom: '12%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
axisLine: { onZero: false },
data: this.state.xAxis_total
},
toolbox: {
show: true,
right: 120,
top: 20,
feature: {
dataZoom: {
yAxisIndex: false,
},
brush: {
type: ['clear']
}
}
},
brush: {
xAxisIndex: 'all',
brushLink: 'all',
outOfBrush: {
colorAlpha: 0.1
}
},
dataZoom: [
{
show: true,
realtime: true,
start: 0,
end: 100,
bottom: 28
},
{
type: 'inside',
realtime: true,
start: 0,
end: 100,
zoomOnMouseWheel: false
}
],
yAxis: {
type: 'value',
scale: true,
},
series: this.state.series_total
}

评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论