diff --git a/src/packages/components/Charts/IntegratedEnergy/CarbonEmission/config.ts b/src/packages/components/Charts/IntegratedEnergy/CarbonEmission/config.ts index 37ccd5a..026dbb4 100644 --- a/src/packages/components/Charts/IntegratedEnergy/CarbonEmission/config.ts +++ b/src/packages/components/Charts/IntegratedEnergy/CarbonEmission/config.ts @@ -5,35 +5,48 @@ import { graphic } from 'echarts/core' import { defaultTheme, chartColorsSearch } from '@/settings/chartThemes/index' import cloneDeep from 'lodash/cloneDeep' import dataJson from './data.json' +import { fontStyle } from 'html2canvas/dist/types/css/property-descriptors/font-style' -export const includes = [ 'xAxis', 'yAxis', 'grid'] +export const includes = ['xAxis', 'yAxis'] const option = { + grid: { + left: '3%', + right: '4%', + bottom: '3%', + top: '15%', + containLabel: true + }, legend: { show: true, - top:'20', - right:'50', - itemStyle:{ + top: '20', + right: '50', + itemStyle: { borderType: 'dotted' }, lineStyle: { - type:'dashed', - cap:'round', - opacity:0.9, + type: 'dashed', + cap: 'round', + opacity: 0.9, }, // icon: 'rect', - data:[{ + data: [{ name: '电', // 强制设置图形为圆。 icon: 'rect', - itemStyle:{ + itemStyle: { color: 'rgba(12, 109, 196,1)' + }, textStyle: { + color: '#eee' }, - },{ + }, { name: '燃气', + textStyle: { + color: '#eee' + }, // 强制设置图形为圆。 icon: 'rect', - itemStyle:{ + itemStyle: { color: 'rgba(48, 189, 104,1)' }, }], @@ -53,21 +66,22 @@ const option = { show: true, type: 'value', name: '单位:万/kwh', - nameGap:30, - axisLine:{ + nameGap: 30, + axisLine: { show: false }, - splitLine:{ + splitLine: { show: true, - lineStyle:{ + lineStyle: { type: 'dashed', - opacity:0.5 + opacity: 0.5 } } }, dataset: { ...dataJson }, series: [ { + type: 'line', smooth: true, symbolSize: 0, //设定实心点的大小 diff --git a/src/packages/components/Charts/IntegratedEnergy/CarbonEmission/config.vue b/src/packages/components/Charts/IntegratedEnergy/CarbonEmission/config.vue index 3b33266..736d3ab 100644 --- a/src/packages/components/Charts/IntegratedEnergy/CarbonEmission/config.vue +++ b/src/packages/components/Charts/IntegratedEnergy/CarbonEmission/config.vue @@ -1,73 +1,41 @@