Toggle navigation
缺陷统计
By
a***0
2018-12-29 08:15:09
脚本
16
21
作品使用的第三方脚本
数据管理
上传数据
支持小于 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
图表已生成
整理代码
刷新
代码
var category = ["12-1", "12-2", "12-3", "12-4", "12-5", "12-6", "12-7", "12-8", "12-9", "12-10"]; //当前前12个月每月月份 var lineData = [700, 750, 850, 1020, 850, 840, 790, 830, 1000, 980]; //总产能 var barData1 = [200, 300, 400, 500, 600, 400, 300, 230, 400, 280]; //正常产能 var barData2 = [300, 200, 100, 400, 200, 200, 240, 180, 200, 400]; //加班产能 var barData3 = [200, 250, 350, 120, 50, 240, 250, 420, 400, 300]; //外发产能 var YlineData = [1200, 1200, 1300, 1540, 1100, 1280, 1280, 1430, 1600, 1680]; //总产能 var YbarData1 = [200, 300, 400, 500, 600, 400, 300, 230, 400, 280]; //正常产能 var YbarData2 = [300, 200, 100, 400, 200, 200, 240, 180, 200, 400]; //加班产能 var YbarData3 = [200, 250, 350, 120, 50, 240, 250, 420, 400, 300]; //外发产能 var YbarData4 = [300, 200, 100, 400, 200, 200, 240, 180, 200, 400]; //加班产能 var YbarData5 = [200, 250, 350, 120, 50, 240, 250, 420, 400, 300]; //外发产能 // option options = [{ backgroundColor: '#fff', tooltip: { trigger: 'axis', axisPointer: { type: 'shadow', label: { show: true, backgroundColor: '#333' } }, formatter: '{a0}: {c0}
{a1}: {c1}
{a2}: {c2}
{a3}: {c3}' }, legend: { data: ['红灯时间', '故障', '缺料', '停机'], }, xAxis: { data: category, axisLine: { lineStyle: { color: '#ccc' } } }, yAxis: { splitLine: { show: false }, axisLine: { lineStyle: { color: '#ccc' } } }, series: [{ name: '红灯时间', type: 'line', smooth: true, showAllSymbol: true, symbol: 'emptyCircle', symbolSize: 10, label: { normal: { show: true, position: 'top' } }, data: lineData }, { name: '故障', type: 'bar', barWidth: 20, stack: '类型', itemStyle: { normal: { barBorderRadius: 5, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: 'rgba(255,99,71,0.8)' }, { offset: 1, color: 'red' }]) } }, data: barData1 }, { name: '缺料', type: 'bar', barWidth: 20, stack: '类型', itemStyle: { normal: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: 'rgba(238,238,0,0.8)' }, // { // offset: 0.5, // color: '#FFCC00' // }, { offset: 1, color: 'rgba(238,238,0,0.3)' } ]) } }, data: barData2 }, { name: '停机', type: 'bar', barWidth: 20, stack: '类型', itemStyle: { normal: { barBorderRadius: 5, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: 'rgba(190,190,190,0.8)' }, { offset: 1, color: 'rgba(190,190,190,0.3)' }]) } }, data: barData3 }, { name: 'dotted', type: 'pictorialBar', symbol: 'rect', itemStyle: { normal: { color: '#EE2C2C' } }, symbolRepeat: true, symbolSize: [12, 4], symbolMargin: 1, z: -10, data: lineData } ] }, { backgroundColor: '#fff', tooltip: { trigger: 'axis', axisPointer: { type: 'shadow', label: { show: true, backgroundColor: '#333' } }, formatter: '{a0}: {c0}
{a1}: {c1}
{a2}: {c2}
{a3}: {c3}' }, legend: { data: ['黄灯时间', '休息', '上料', '换模', '等待', '其他'], }, xAxis: { data: category, axisLine: { lineStyle: { color: '#ccc' } } }, yAxis: { splitLine: { show: false }, axisLine: { lineStyle: { color: '#ccc' } } }, series: [{ name: '黄灯时间', type: 'line', smooth: true, showAllSymbol: true, symbol: 'emptyCircle', symbolSize: 10, label: { normal: { show: true, position: 'top' } }, "itemStyle": { "normal": { "color": "rgba(255,215,0,1)", "barBorderRadius": 0, } }, data: YlineData }, { name: '休息', type: 'bar', barWidth: 20, stack: '类型', itemStyle: { normal: { barBorderRadius: 5, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: 'rgba(173, 216, 230,0.8)' }, { offset: 1, color: 'rgba(175, 238, 238,0.5)' }]) } }, data: YbarData1 }, { name: '上料', type: 'bar', barWidth: 20, stack: '类型', itemStyle: { normal: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: 'rgba(205, 149, 12,0.8)' }, // { // offset: 0.5, // color: '#FFCC00' // }, { offset: 1, color: 'rgba(205, 149, 12,0.3)' } ]) } }, data: YbarData2 }, { name: '换模', type: 'bar', barWidth: 20, stack: '类型', itemStyle: { normal: { barBorderRadius: 5, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: 'rgba(70, 130, 180,0.8)' }, { offset: 1, color: 'rgba(70, 130, 180,0.3)' }]) } }, data: YbarData3 }, { name: '等待', type: 'bar', barWidth: 20, stack: '类型', itemStyle: { normal: { barBorderRadius: 5, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: 'rgba(255, 235, 0,0.8)' }, { offset: 1, color: 'rgba(255, 235, 0,0.3)' }]) } }, data: YbarData4 }, { name: '其他', type: 'bar', barWidth: 20, stack: '类型', itemStyle: { normal: { barBorderRadius: 5, color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: 'rgba(139, 134, 130,0.8)' }, { offset: 1, color: 'rgba(139, 134, 130,0.3)' }]) } }, data: YbarData5 }, { name: 'dotted', type: 'pictorialBar', symbol: 'rect', itemStyle: { normal: { color: '#FFC125' } }, symbolRepeat: true, symbolSize: [12, 4], symbolMargin: 1, z: -10, data: YlineData } ] } ];