// 加载echars
initChart() {
let that = this;
let chartDom = document.getElementById(this.lineId);
this.chartLine = echarts.init(chartDom);
window.addEventListener(‘rsize’, () => {
this.chartLine.resize();
});
this.chartLine.setOption(
{
legend: {
type: ‘scroll’,
data: this.legend,
orient: ‘vertical’,
y: ‘center’,
x: ‘right’,
tooltip: {
show: true
}
},
grid: {
top: 40,
right:
this.sizestyle.substr(7, 1) === ‘1’
? ‘250’
: this.sizestyle.substr(7, 1) === ‘7’
? ‘170’
: ‘160’,
bottom: 60,
left: 70
},
dataZoom: [
{
type: ‘inside’,
start: 0,
end: 1
},
{
start: 0,
end: 20
}
],
tooltip: {
confine: true,
trigger: ‘axis
点击表格,联动设置echars折线图(当前折线ip加粗)
于 2022-02-23 16:08:58 首次发布