|
|
import 'activity/grade-detail.page.css';
|
|
|
import $ from 'yoho-jquery';
|
|
|
import echarts from 'echarts';
|
|
|
import Page from 'yoho-page';
|
|
|
|
|
|
|
|
|
class GradeDetailPage extends Page {
|
|
|
constructor() {
|
|
|
super();
|
|
|
|
|
|
this.view = {
|
|
|
gradeGraph: $('#gradeGraph')
|
|
|
};
|
|
|
|
|
|
this.eGadeGraph = echarts.init(this.view.gradeGraph[0]);
|
|
|
|
|
|
let option = {
|
|
|
backgroundColor: '#2d2d2d',
|
|
|
grid: {
|
|
|
show: false
|
|
|
},
|
|
|
tooltip: {
|
|
|
trigger: 'none'
|
|
|
},
|
|
|
dataZoom: [{
|
|
|
type: 'inside',
|
|
|
startValue: '2月',
|
|
|
endValue: '5月',
|
|
|
zoomOnMouseWheel: false,
|
|
|
filterMode: 'none'
|
|
|
}],
|
|
|
xAxis: {
|
|
|
type: 'category',
|
|
|
boundaryGap: false,
|
|
|
axisLine: {
|
|
|
show: false
|
|
|
},
|
|
|
axisTick: {
|
|
|
show: false
|
|
|
},
|
|
|
data: [{
|
|
|
value: '1月',
|
|
|
textStyle: {
|
|
|
color: '#fff',
|
|
|
fontSize: 12
|
|
|
}
|
|
|
}, {
|
|
|
value: '2月',
|
|
|
textStyle: {
|
|
|
color: '#fff',
|
|
|
fontSize: 12
|
|
|
}
|
|
|
}, {
|
|
|
value: '3月',
|
|
|
textStyle: {
|
|
|
color: '#fff',
|
|
|
fontSize: 12
|
|
|
}
|
|
|
}, {
|
|
|
value: '4月',
|
|
|
textStyle: {
|
|
|
color: '#fff',
|
|
|
fontSize: 12
|
|
|
}
|
|
|
}, {
|
|
|
value: '5月',
|
|
|
textStyle: {
|
|
|
color: '#000',
|
|
|
fontWeight: 'bold',
|
|
|
fontSize: 18,
|
|
|
backgroundColor: '#fff'
|
|
|
}
|
|
|
}, {
|
|
|
value: '6月',
|
|
|
textStyle: {
|
|
|
color: '#fff',
|
|
|
fontSize: 12
|
|
|
}
|
|
|
}]
|
|
|
},
|
|
|
yAxis: {
|
|
|
type: 'value',
|
|
|
show: false,
|
|
|
},
|
|
|
series: [{
|
|
|
data: [820, 932, 901, 934, 1290, 1330, 1320],
|
|
|
color: ['#A59075'],
|
|
|
symbol: 'circle',
|
|
|
symbolSize: 8,
|
|
|
type: 'line',
|
|
|
label: {
|
|
|
normal: {
|
|
|
show: true,
|
|
|
position: 'top'
|
|
|
}
|
|
|
},
|
|
|
}]
|
|
|
};
|
|
|
|
|
|
this.eGadeGraph.setOption(option);
|
|
|
|
|
|
this.eGadeGraph.on('click', event => {
|
|
|
console.log('当前是:' + event.name);
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
export default new GradeDetailPage(); |
...
|
...
|
|