// 基于准备好的dom,初始化echarts实例 // 指定图表的配置项和数据 var option = { title: { text: 'ECharts 入门示例' }, tooltip: {}, legend: { data:['销量'] }, xAxis: { type: 'category', scale: true, boundaryGap : false, data: ["2016/6/01","2016/6/02","2016/6/03","2016/6/04","2016/6/05","2016/6/06","2016/6/07","2016/6/08","2016/6/09","2016/6/10","2016/6/11","2016/6/12","2016/6/13","2016/6/14","2016/6/15","2016/6/16","2016/6/17","2016/6/18","2016/6/19","2016/6/20"] }, yAxis: { type: 'value', scale:true, boundaryGap: [0.01, 0.01] }, series: [{ name: '销量', type: 'line', data: [575, 257, 336, 330, 295, 379,367,390,334,271,314,333,273,286,247,290,341,366,336,291,400], itemStyle : { normal : { lineStyle:{ color:'#fe7c2e' } } }, areaStyle: { normal: { color: '#fff4ee' } } }] };