Toggle navigation
供回温度曲线
By
M***8
2020-04-27 05:44:08
脚本
16
21
作品使用的第三方脚本
/dep/echarts/latest/extension/bmap.min.js
数据管理
上传数据
支持小于 5M 任意格式(csv, xlsx, json, xml, ...)的数据文件
上传后可以通过生成的文件链接异步获取托管的数据。
历史数据
0 条
无历史数据
代码修改记录
信息提示
保存作品
对当前截图不满意?你还可以
上传本地截图
重新截图
作品名称
作品描述
标签
geo
grid
legend
markLine
markPoint
bar
effectScatter
line
lines
map
timeline
title
toolbox
tooltip
visualMap
作品默认版本
最新
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
20:11:45
图表已生成
整理代码
刷新
代码
option = { title: { text: '', x: 'center', y: 0, textStyle: { color: '#B4B4B4', fontSize: 16, fontWeight: 'normal' } }, tooltip: { trigger: 'axis', backgroundColor: 'rgba(0,0,0,0.6)', // formatter:"{b}:{c}" formatter: function(params) { let str = params[0].name + ' ' + params[0].data.stationName + ''; params.forEach(item => { if (item.seriesName === '供温' || item.seriesName === '回温') { str += item.marker + item.seriesName + ' : ' + item.data.value + ' ℃' + ''; } else if (item.seriesName === '压力值(Mpa)') { // 柱状图渐变时设置marker item.marker = '
'; str += item.marker + item.seriesName + ' : ' + item.data.value + ' m'; } }); return str; } }, legend: { // 修改legend的高度宽度 itemHeight: 5, itemWidth: 24, data: [{ name: '供温', icon: 'rect' // legend的icon }, { name: '回温', icon: 'rect' }, { name: '压力值(Mpa)', icon: 'rect' } ], textStyle: { color: '#B4B4B4' }, top: '7%', // 选择关闭的legend selected: { '回温': false } }, grid: { x: '8%', width: '82%', y: '12%' }, xAxis: [{ // type:'category', data: ["1km",'2km','3km','4km','5km','6km'], boundaryGap: true, axisLine: { lineStyle: { color: '#B4B4B4' } }, axisTick: { show: false } }], yAxis: [{ name: '供回温度(℃)', nameLocation: 'middle', nameTextStyle: { padding: [3, 4, 50, 6] }, splitLine: { show: true, lineStyle: { type: 'dashed', color: '#eee' } }, axisLine: { show: false }, axisTick: { show: false }, axisLabel: { textStyle: { color: '#333' }, formatter: '{value} ' } }, { name: '压力值(Mpa)', nameLocation: 'middle', nameTextStyle: { padding: [50, 4, 5, 6] }, splitLine: { show: false }, axisLine: { show: false }, axisTick: { show: false }, axisLabel: { textStyle: { color: '#333' }, formatter: '{value} ' } } ], series: [{ name: '供温', type: 'line', smooth: true, showSymbol: true, // 矢量画五角星 symbol: 'path://M150 0 L80 175 L250 75 L50 75 L220 175 Z', symbolSize: 12, yAxisIndex: 0, areaStyle: { normal: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1,[{ offset: 0, color: 'rgba(250,180,101,0.3)' }, { offset: 1, color: 'rgba(250,180,101,0)' } ],), shadowColor: 'rgba(250,180,101,0.2)', shadowBlur: 20 } }, itemStyle: { normal: { color: '#FF8000' } }, // data中可以使用对象,value代表相应的值,另外可加入自定义的属性 data: [{ value: 1, stationName: "s1" }, { value: 3, stationName: "s2" }, { value: 4, stationName: "s3" }, { value: 9, stationName: "s4" }, { value: 3, stationName: "s5" }, { value: 2, stationName: "s6" }] }, { name: '回温', type: 'line', smooth: true, showSymbol: true, symbol: 'emptyCircle', symbolSize: 12, yAxisIndex: 0, areaStyle: { normal: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: 'rgba(199, 237, 250,0.5)' }, { offset: 1, color: 'rgba(199, 237, 250,0.2)' } ], false ) } }, itemStyle: { normal: { color: '#3bbc86' } }, data: [{ value: 31, stationName: "s1" }, { value: 36, stationName: "s2" }, { value: 54, stationName: "s3" }, { value: 89, stationName: "s4" }, { value: 73, stationName: "s5" }, { value: 22, stationName: "s6" }] }, { name: '压力值(Mpa)', type: 'bar', barWidth: 30, yAxisIndex: 1, itemStyle: { normal: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: 'rgba(108,80,243,0.3)' }, { offset: 1, color: 'rgba(108,80,243,0)' } ]), //柱状图圆角 barBorderRadius: [30,30,0,0], } }, data: [{ value: 11, stationName: "s1" }, { value: 34, stationName: "s2" }, { value: 54, stationName: "s3" }, { value: 39, stationName: "s4" }, { value: 63, stationName: "s5" }, { value: 24, stationName: "s6" }] } ] };