<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div id="pic4" style="width: 600px;height:400px;"></div>
<script src="https://cdn.bootcss.com/echarts/4.0.2/echarts.js"></script>
<script>
var myChart13 = echarts.init(document.getElementById('pic4'));
var data = [];
option15 = {
title: {
text: '曲线',
},
tooltip: {
trigger: 'axis', },
legend: {
data:['昨日(11月8日)','今日(11月9日)']
},
grid: {
left: '1%',
right: '1%',
bottom: '3%',
containLabel: true
},
toolbox: {
show: false,
feature: {
dataZoom: {
yAxisIndex: 'none'
},
dataView: {readOnly: false},
magicType: {type: ['line', 'bar']},
restore: {},
saveAsImage: {}
}
},
color:["red","#CD3333"],
xAxis: {
type: 'category',
boundaryGap: false,
data : ['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24']
},
yAxis: {
type: 'value',
name: '单位(kW)',
axisLabel: {
formatter: '{value}'
}
},
series: [
{
name:'昨日(11月8日)',
type:'line',
data:[110,106,110,110,318,119,205,256,156,309,256,306,206,356,456,486,565.45,234,156,206,126,256,150,276],
itemStyle: {
normal: {
//color: function(params) {
       // var colorList = ['#2eddc1','#FCCE10','#E87C25','#277bbb','#E87fff','#277aaa'];
// //若返回的list长度不足,不足部分自动显示为最后一个颜色
       // return colorList[params.dataIndex]
       // },
label: {
show: true,
position: 'top'
}
}
}
},
{
type:'line',
name : '今日(11月9日)',
data:[210,136,120,120,118,219,195,176,156,329,356,346,406.54,256,156],
}
]
}; myChart13.setOption(option15);
</script>
</body>
</html>

效果如下:

最新文章

  1. webBrowser1
  2. MyEclipse中的SVN操作手册
  3. poj3263 Tallest Cow
  4. 绑定事件 addEventListener
  5. js的严谨模式
  6. GDB调试精粹及使用实例
  7. 【代码】Android: 怎样设置app不被系统k掉
  8. Macosx Setdns
  9. Windows Phone App Studio发布
  10. mysql--二进制日志(bin-log)三种格式介绍及分析
  11. 三栏布局,div左右盒子是定宽,中间是自适应
  12. DataPipeline丨新型企业数据融合平台的探索与实践
  13. C语言程序设计I—寒假作业安排
  14. .net core Ocelot实现API网关并部署在docker中
  15. pytho学习笔记---编码
  16. wget 下载命令
  17. HTML5绘制饼图示例(一)
  18. How to use base class&#39;s assignment operator in C++
  19. HDUOJ --2544最短路(基础)
  20. MySQL事务概述-1

热门文章

  1. hihoCoder 1145 幻想乡的日常(树状数组 + 离线处理)
  2. python学习打卡 day12 生成器
  3. 深入JVM对象引用
  4. 清除div重叠浮动的方法
  5. [原]windows sdk版本不对
  6. Boostrap本地导入js文件
  7. MySQL学习(九)
  8. dock容器操作命令
  9. 牛客OI周赛4-提高组 A K小生成树(kmst)
  10. Redis消息之发布与订阅