1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- (function() {
- function getOption(xAxis, seriesData) {
- return option = {
- backgroundColor: '#fff5e9',
- grid: {
- x: 30,
- y: 20,
- x2: 40,
- y2: 30
- },
- xAxis : [
- {
- type : 'category',
- boundaryGap : false,
- data : xAxis
- }
- ],
- yAxis : [
- {
- type : 'value'
- }
- ],
- series : [
- {
- type:'line',
- data: seriesData
- }
- ]
- };
- }
-
- var chart = echarts.init(document.getElementById('conclusionChart'))
-
- var conclusionChart = {
- init: function(data) {
- var xAxis = _.pluck(data,'name');
- var seriesData = _.pluck(data,'score')
-
- chart.setOption(getOption(xAxis, seriesData));
- }
- }
-
- window.conclusionChart = conclusionChart;
- })()
|