From 3b2cd10bf1780897d009bd711653129150ee38ec Mon Sep 17 00:00:00 2001 From: Free-sss <630042479@qq.com> Date: Thu, 4 Sep 2025 22:17:56 +0800 Subject: [PATCH] =?UTF-8?q?fix=E3=80=90=E8=83=BD=E6=BA=90=E5=9C=BA?= =?UTF-8?q?=E6=99=AF=E3=80=91=EF=BC=9A=E4=BF=AE=E5=A4=8D=E7=A2=B3=E6=8E=92?= =?UTF-8?q?=E6=94=BE=E4=BD=BF=E7=94=A8=E5=85=A8=E5=B1=80=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=AF=BC=E8=87=B4BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IntegratedEnergy/CarbonEmission/config.ts | 46 +++++++---- .../CarbonEmission/config.vue | 78 ++++++------------- 2 files changed, 53 insertions(+), 71 deletions(-) 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 @@