123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782 |
- import * as echarts from 'echarts'
- import {fontSize} from "../../utils";
- export const gaugeOption = {
- series: [
- {
- type: 'gauge',
- center: ['50%', '70%'],
- startAngle: 200,
- endAngle: -20,
- min: 0,
- max: 60,
- // splitNumber: 12,
- itemStyle: {
- color: '#FFAB91'
- },
- progress: {
- show: true,
- width: fontSize(0.2)
- },
- pointer: {
- show: false
- },
- axisLine: {
- lineStyle: {
- width: fontSize(0.2)
- }
- },
- axisTick: {
- distance: -fontSize(.45),
- splitNumber: 5,
- lineStyle: {
- // width: 1,
- color: '#999'
- }
- },
- splitLine: {
- distance: -fontSize(.5),
- length: fontSize(.14),
- lineStyle: {
- // width: 3,
- color: '#999'
- }
- },
- axisLabel: {
- distance: -fontSize(.2),
- color: '#999',
- fontSize: fontSize(0.16)
- },
- anchor: {
- show: false
- },
- title: {
- show: false
- },
- detail: {
- valueAnimation: true,
- width: '60%',
- lineHeight: 40,
- borderRadius: 8,
- offsetCenter: [0, '-15%'],
- fontSize: 20,
- fontWeight: 'bolder',
- formatter: '{value} 个',
- color: 'inherit'
- },
- data: [
- {
- value: 20
- }
- ]
- },
- {
- type: 'gauge',
- center: ['50%', '75%'],
- startAngle: 200,
- endAngle: -20,
- min: 0,
- max: 60,
- itemStyle: {
- color: '#FD7347'
- },
- progress: {
- show: true,
- // width: 8
- },
- pointer: {
- show: false
- },
- axisLine: {
- show: false
- },
- axisTick: {
- show: false
- },
- splitLine: {
- show: false
- },
- axisLabel: {
- show: false
- },
- detail: {
- valueAnimation: true,
- width: '60%',
- lineHeight: 40,
- borderRadius: 8,
- offsetCenter: [0, '50%'],
- fontSize: fontSize(0.2),
- fontWeight: 'bolder',
- formatter: '限电场站数',
- color: 'inherit'
- },
- data: [
- {
- value: 20
- }
- ]
- }
- ]
- }
- /**
- * 功率曲线
- * */
- export let lineOption = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- animation: false,
- label: {
- backgroundColor: '#505765'
- }
- }
- }, grid: {
- left: 55,
- right: 30,
- bottom: 30
- },
- legend: {
- data: ['实际功率', '可用功率', '理论功率', '短期', '超短期'],
- itemStyle: {
- opacity: 0
- },
- textStyle: {fontSize: fontSize(0.12),color: '#89BFE5'},
- top: '2%'
- },
- xAxis: [
- {
- type: 'category',
- boundaryGap: false,
- axisLine: {
- onZero: false, lineStyle: {
- color: '#5fbbeb'
- }
- },
- axisLabel: {
- color: '#89BFE5',
- textStyle: {
- fontSize: fontSize(.12)
- }
- },
- axisTick: {
- show: false, // 隐藏X轴轴线
- alignWithLabel: true
- },
- data: ['00:00',
- '00:15', '00:30', '00:45', '01:00',
- '01:15', '01:30', '01:45', '02:00',
- '02:15', '02:30', '02:45', '03:00',
- '03:15', '03:30', '03:45', '04:00',
- '04:15', '04:30', '04:45', '05:00',
- '05:15', '05:30', '05:45', '06:00',
- '06:15', '06:30', '06:45', '07:00',
- '07:15', '07:30', '07:45', '08:00',
- '08:15', '08:30', '08:45', '09:00',
- '09:15', '09:30', '09:45', '10:00',
- '10:15', '10:30', '10:45', '11:00',
- '11:15', '11:30', '11:45', '12:00',
- '12:15', '12:30', '12:45', '13:00',
- '13:15', '13:30', '14:45', '14:00',
- '14:15', '14:30', '14:45', '15:00',
- '15:15', '15:30', '15:45', '16:00',
- '16:15', '16:30', '16:45', '17:00',
- '17:15', '17:30', '17:45', '18:00',
- '18:15', '18:30', '18:45', '19:00',
- '19:15', '19:30', '19:45', '20:00',
- '20:15', '20:30', '20:45', '21:00',
- '21:15', '21:30', '21:45', '22:00',
- '22:15', '22:30', '22:45', '23:00',
- '23:15', '23:30', '23:45'
- ]
- }
- ],
- yAxis: [
- {
- name: 'MW',
- type: 'value',
- nameTextStyle: {color: '#89BFE5',fontSize: fontSize(.14)},
- axisLabel: {
- textStyle: {
- fontSize: fontSize(.12), color: '#89BFE5'
- }
- },
- axisTick: {
- show: false,
- },
- axisLine: {
- lineStyle: {
- color: '#394458',
- },
- },
- splitLine: {
- lineStyle: {
- type: 'dashed',
- color: '#394458',
- },
- },
- }
- ],
- series: [
- {
- name: '实际功率',
- type: 'line',
- itemStyle: {
- color: 'rgb(2,207,253)'
- },
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: 'rgb(2,205,251)'
- },
- {
- offset: 1,
- color: 'rgba(2,205,251,0)'
- }
- ])
- },
- lineStyle: {
- width: 1
- },
- emphasis: {
- focus: 'series'
- },
- // prettier-ignore
- data: []
- }, {
- name: '可用功率',
- type: 'line',
- itemStyle: {
- color: 'rgb(253,128,2)'
- },
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: 'rgb(253,128,2)'
- },
- {
- offset: 1,
- color: 'rgba(2,205,251,0)'
- }
- ])
- },
- lineStyle: {
- width: 1
- },
- emphasis: {
- focus: 'series'
- },
- // prettier-ignore
- data: []
- }, {
- name: '理论功率',
- type: 'line',
- itemStyle: {
- color: 'rgb(253,10,2)'
- },
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: 'rgb(253,10,2)'
- },
- {
- offset: 1,
- color: 'rgba(2,205,251,0)'
- }
- ])
- },
- lineStyle: {
- width: 1
- },
- emphasis: {
- focus: 'series'
- },
- // prettier-ignore
- data: []
- }, {
- name: '短期',
- type: 'line',
- itemStyle: {
- color: 'rgb(175,129,251)'
- },
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: 'rgb(174,128,249)'
- },
- {
- offset: 1,
- color: 'rgba(173,127,247,0)'
- }
- ])
- },
- lineStyle: {
- width: 1
- },
- emphasis: {
- focus: 'series'
- },
- // prettier-ignore
- data: []
- }, {
- name: '超短期',
- type: 'line',
- itemStyle: {
- color: 'rgb(135,247,207)'
- },
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: 'rgb(134,245,205)'
- },
- {
- offset: 1,
- color: 'rgba(134,245,205,0)'
- }
- ])
- },
- lineStyle: {
- width: 1
- },
- emphasis: {
- focus: 'series'
- },
- // prettier-ignore
- data: []
- },
- ]
- }
- /**
- * 气象预测曲线
- * */
- export let weatherLineOption = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- animation: false,
- label: {
- backgroundColor: '#505765'
- }
- }
- }, grid: {
- left: 30,
- right: 30,
- bottom: 30
- },
- legend: {
- data: ['实际功率', '短期', '超短期','辐照度'],
- itemStyle: {
- opacity: 0
- },
- textStyle: {fontSize: fontSize(0.12),color: '#89BFE5'},
- top: '2%'
- },
- xAxis: [
- {
- type: 'category',
- boundaryGap: false,
- axisLine: {
- onZero: false, lineStyle: {
- color: '#5fbbeb'
- }
- },
- axisLabel: {
- color: '#89BFE5',
- textStyle: {
- fontSize: fontSize(.12)
- }
- },
- axisTick: {
- show: false, // 隐藏X轴轴线
- alignWithLabel: true
- },
- data: ['00:00',
- '00:15', '00:30', '00:45', '01:00',
- '01:15', '01:30', '01:45', '02:00',
- '02:15', '02:30', '02:45', '03:00',
- '03:15', '03:30', '03:45', '04:00',
- '04:15', '04:30', '04:45', '05:00',
- '05:15', '05:30', '05:45', '06:00',
- '06:15', '06:30', '06:45', '07:00',
- '07:15', '07:30', '07:45', '08:00',
- '08:15', '08:30', '08:45', '09:00',
- '09:15', '09:30', '09:45', '10:00',
- '10:15', '10:30', '10:45', '11:00',
- '11:15', '11:30', '11:45', '12:00',
- '12:15', '12:30', '12:45', '13:00',
- '13:15', '13:30', '14:45', '14:00',
- '14:15', '14:30', '14:45', '15:00',
- '15:15', '15:30', '15:45', '16:00',
- '16:15', '16:30', '16:45', '17:00',
- '17:15', '17:30', '17:45', '18:00',
- '18:15', '18:30', '18:45', '19:00',
- '19:15', '19:30', '19:45', '20:00',
- '20:15', '20:30', '20:45', '21:00',
- '21:15', '21:30', '21:45', '22:00',
- '22:15', '22:30', '22:45', '23:00',
- '23:15', '23:30', '23:45'
- ]
- }
- ],
- yAxis: [
- {
- name: 'MW',
- type: 'value',
- nameTextStyle: {color: '#89BFE5',fontSize: fontSize(.14)},
- axisLabel: {
- textStyle: {
- fontSize: fontSize(.12), color: '#89BFE5'
- }
- },
- axisTick: {
- show: false,
- },
- axisLine: {
- lineStyle: {
- color: '#394458',
- },
- },
- splitLine: {
- lineStyle: {
- type: 'dashed',
- color: '#394458',
- },
- },
- },{
- name: 'W/㎡',
- type: 'value',
- nameTextStyle: {color: '#89BFE5',fontSize: fontSize(.14)},
- axisLabel: {
- textStyle: {
- fontSize: fontSize(.12), color: '#89BFE5'
- }
- },
- axisTick: {
- show: false,
- },
- axisLine: {
- lineStyle: {
- color: '#394458',
- },
- },
- splitLine: {
- lineStyle: {
- type: 'dashed',
- color: '#394458',
- },
- },
- }
- ],
- series: [
- {
- name: '实际功率',
- type: 'line',
- itemStyle: {
- color: 'rgb(2,207,253)'
- },
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: 'rgb(2,205,251)'
- },
- {
- offset: 1,
- color: 'rgba(2,205,251,0)'
- }
- ])
- },
- lineStyle: {
- width: 1
- },
- emphasis: {
- focus: 'series'
- },
- // prettier-ignore
- data: []
- },
- {
- name: '短期',
- type: 'line',
- itemStyle: {
- color: 'rgb(175,129,251)'
- },
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: 'rgb(174,128,249)'
- },
- {
- offset: 1,
- color: 'rgba(173,127,247,0)'
- }
- ])
- },
- lineStyle: {
- width: 1
- },
- emphasis: {
- focus: 'series'
- },
- // prettier-ignore
- data: []
- }, {
- name: '超短期',
- type: 'line',
- itemStyle: {
- color: 'rgb(135,247,207)'
- },
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: 'rgb(134,245,205)'
- },
- {
- offset: 1,
- color: 'rgba(134,245,205,0)'
- }
- ])
- },
- lineStyle: {
- width: 1
- },
- emphasis: {
- focus: 'series'
- },
- // prettier-ignore
- data: []
- },{
- name: '辐照度',
- yAxisIndex:1,
- type: 'line',
- itemStyle: {
- color: 'rgb(253,128,2)'
- },
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: 'rgb(253,128,2)'
- },
- {
- offset: 1,
- color: 'rgba(2,205,251,0)'
- }
- ])
- },
- lineStyle: {
- width: 1
- },
- emphasis: {
- focus: 'series'
- },
- // prettier-ignore
- data: []
- },
- ]
- }
- /**
- * 未来10天预测电量
- **/
- export const forecast10LineOption = {
- animation: false,
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
- },
- grid: {
- left: 20,
- right: 30,
- bottom: 10,
- containLabel: true
- },
- xAxis: {
- type: 'category',
- data: [],
- axisLine: {
- lineStyle: {
- color: '#5fbbeb'
- }
- },
- axisTick: {
- show: false, // 隐藏X轴轴线
- alignWithLabel: true
- },
- axisLabel: {
- color: '#89BFE5'
- },
- },
- yAxis: {
- type: 'value',
- name: '万kWh',
- nameTextStyle: {
- color: '#89BFE5'
- },
- axisLabel: {
- padding: [3, 0, 0, 0],
- formatter: '{value}',
- textStyle: {
- fontSize: 14,
- color: '#89BFE5'
- },
- },
- axisTick: {
- show: false,
- },
- axisLine: {
- lineStyle: {
- color: '#394458',
- },
- },
- splitLine: {
- lineStyle: {
- type: 'dashed',
- color: '#394458',
- },
- },
- },
- series: [
- {
- type: 'bar',
- barWidth: '60%',
- data: [],
- color: 'rgb(95,187,235)',
- itemStyle: {
- // 柱子的颜色
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: 'rgb(95,187,235)'
- }, {
- offset: 0.25,
- color: 'rgb(95,187,235,0.75)'
- }, {
- offset: 0.5,
- color: 'rgba(95,187,235,0.5)'
- }, {
- offset: 0.75,
- color: 'rgb(95,187,235,0.25)'
- }, {
- offset: 1,
- color: 'rgba(95,187,235,0.0)'
- }]),
- },
- emphasis: {
- itemStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {offset: 1, color: 'rgb(95,187,235)'}
- ])
- }
- },
- // 鼠标放到柱子上显示数据
- tooltip: {
- valueFormatter: function (value) {
- return value + '万kWh';
- }
- },
- }
- ]
- }
- /**
- * 短期偏差统计
- */
- export const dqTickOptions= {
- grid: {
- top:30,
- left: 40,
- right: 10,
- bottom: 30
- },
- animation: false,
- tooltip: {
- trigger: 'axis',
- formatter: function (params){
- let str = params[0].axisValue +'<br/>'
- for(let param of params){
- if(param.componentSubType === 'scatter'){
- str = str + '<div class="flex justify-between"><div>'+param.marker+param.seriesName+'</div><div>'+param.value[1]+'</div></div>'
- }
- if(param.componentSubType === 'boxplot'){
- str = str + '<div class="flex justify-between"><div>'+param.marker+'min</div><div>'+param.value[1]+'</div></div>'+
- '<div class="flex justify-between"><div>'+param.marker+'Q1</div><div>'+param.value[2]+'</div></div>'+
- '<div class="flex justify-between"><div>'+param.marker+'median</div><div>'+param.value[3]+'</div></div>'+
- '<div class="flex justify-between"><div>'+param.marker+'Q3</div><div>'+param.value[4]+'</div></div>'+
- '<div class="flex justify-between"><div>'+param.marker+'max</div><div>'+param.value[5]+'</div></div>'
- }
- }
- return str
- }
- },
- xAxis: {
- type: 'category',
- axisLabel: {
- color: '#89BFE5'
- },
- axisTick: {show: true},
- axisLine: {
- onZero: false,
- lineStyle: {
- color: '#5fbbeb'
- }
- },
- data: []
- },
- yAxis: {
- type: 'value',
- axisLabel: {
- padding: [3, 0, 0, 0],
- formatter: '{value}',
- textStyle: {
- fontSize: 14,
- color: '#89BFE5'
- },
- },
- axisTick: {
- show: false,
- },
- axisLine: {
- lineStyle: {
- color: '#394458',
- },
- },
- splitLine: {
- lineStyle: {
- type: 'dashed',
- color: '#394458',
- },
- },
- },
- series: [
- {
- name: '',
- type: 'boxplot',
- itemStyle: {
- color:'rgba(126,199,250,0.86)',
- // 边线颜色
- borderColor: '#89BFE5',
- // 边线宽度
- borderWidth: 2
- },
- data: []
- },
- {
- type: 'scatter',
- itemStyle: {
- color:'orange',
- },
- data: []
- }
- ]
- }
|