From d3188aa672cffa95c5cb38d5df53a327d6cb9729 Mon Sep 17 00:00:00 2001 From: "hong.yang" Date: Wed, 15 Nov 2023 11:35:27 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix=EF=BC=9A=E5=88=86=E7=BB=84=E3=80=81?= =?UTF-8?q?=E5=A0=86=E5=8F=A0=E7=BA=BF=E5=9B=BE=E3=80=81=E6=9F=B1=E5=9B=BE?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=BB=98=E8=AE=A4=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../G2Plots/折线图/多折线动画图.js | 98 ++-------- .../G2Plots/折线图/多折线图.js | 98 ++-------- .../G2Plots/折线图/多阶梯折线图.js | 98 ++-------- .../折线图/折线趋势填充图.js | 98 ++-------- .../G2Plots/条形图/分组条形图.js | 62 ++----- .../G2Plots/条形图/堆叠条形图.js | 62 ++----- .../G2Plots/柱状图/分组柱状图.js | 94 ++-------- .../G2Plots/柱状图/圆角柱状图.js | 94 ++-------- .../G2Plots/柱状图/堆叠柱状图.js | 32 ++-- .../G2Plots/面积图/堆叠面积图.js | 167 ++---------------- 10 files changed, 146 insertions(+), 757 deletions(-) diff --git a/data-room-ui/packages/G2Plots/折线图/多折线动画图.js b/data-room-ui/packages/G2Plots/折线图/多折线动画图.js index 424572a2..466c9360 100644 --- a/data-room-ui/packages/G2Plots/折线图/多折线动画图.js +++ b/data-room-ui/packages/G2Plots/折线图/多折线动画图.js @@ -492,86 +492,22 @@ const setting = [ // 模拟数据 const data = [ - { - year:'1', - value:100, - type:'今年' - }, - { - year:'2', - value:200, - type:'今年' - }, - { - year:'3', - value:300, - type:'今年' - }, - { - year:'4', - value:200, - type:'今年' - }, - { - year:'5', - value:100, - type:'今年' - }, - { - year:'6', - value:200, - type:'今年' - }, - { - year:'7', - value:300, - type:'今年' - }, - { - year:'8', - value:400, - type:'今年' - }, - { - year:'1', - value:400, - type:'去年' - }, - { - year:'2', - value:100, - type:'去年' - }, - { - year:'3', - value:200, - type:'去年' - }, - { - year:'4', - value:300, - type:'去年' - }, - { - year:'5', - value:200, - type:'去年' - }, - { - year:'6', - value:100, - type:'去年' - }, - { - year:'7', - value:200, - type:'去年' - }, - { - year:'8', - value:300, - type:'去年' - } + { date: '2016年', value: 100, type: '已处理' }, + { date: '2017年', value: 200, type: '已处理' }, + { date: '2018年', value: 300, type: '已处理' }, + { date: '2019年', value: 200, type: '已处理' }, + { date: '2020年', value: 100, type: '已处理' }, + { date: '2021年', value: 200, type: '已处理' }, + { date: '2022年', value: 300, type: '已处理' }, + { date: '2023年', value: 400, type: '已处理' }, + { date: '2016年', value: 400, type: '未处理' }, + { date: '2017年', value: 100, type: '未处理' }, + { date: '2018年', value: 200, type: '未处理' }, + { date: '2019年', value: 300, type: '未处理' }, + { date: '2020年', value: 200, type: '未处理' }, + { date: '2021年', value: 100, type: '未处理' }, + { date: '2022年', value: 200, type: '未处理' }, + { date: '2023年', value: 300, type: '未处理' } ] // 配置处理脚本 @@ -593,7 +529,7 @@ const option = { renderer: 'canvas', data, color: ['#6b74e4', '#4391f4', '#38bbe5', '#69d6fd', '#36c6a0'], - xField: 'year', + xField: 'date', yField: 'value', seriesField: 'type', xAxis: { diff --git a/data-room-ui/packages/G2Plots/折线图/多折线图.js b/data-room-ui/packages/G2Plots/折线图/多折线图.js index 6a17d100..d1b00071 100644 --- a/data-room-ui/packages/G2Plots/折线图/多折线图.js +++ b/data-room-ui/packages/G2Plots/折线图/多折线图.js @@ -553,86 +553,22 @@ const setting = [ // 模拟数据 const data = [ - { - year:'1', - value:100, - type:'今年' - }, - { - year:'2', - value:200, - type:'今年' - }, - { - year:'3', - value:300, - type:'今年' - }, - { - year:'4', - value:200, - type:'今年' - }, - { - year:'5', - value:100, - type:'今年' - }, - { - year:'6', - value:200, - type:'今年' - }, - { - year:'7', - value:300, - type:'今年' - }, - { - year:'8', - value:400, - type:'今年' - }, - { - year:'1', - value:400, - type:'去年' - }, - { - year:'2', - value:100, - type:'去年' - }, - { - year:'3', - value:200, - type:'去年' - }, - { - year:'4', - value:300, - type:'去年' - }, - { - year:'5', - value:200, - type:'去年' - }, - { - year:'6', - value:100, - type:'去年' - }, - { - year:'7', - value:200, - type:'去年' - }, - { - year:'8', - value:300, - type:'去年' - } + { date: '2016年', value: 100, type: '已处理' }, + { date: '2017年', value: 200, type: '已处理' }, + { date: '2018年', value: 300, type: '已处理' }, + { date: '2019年', value: 200, type: '已处理' }, + { date: '2020年', value: 100, type: '已处理' }, + { date: '2021年', value: 200, type: '已处理' }, + { date: '2022年', value: 300, type: '已处理' }, + { date: '2023年', value: 400, type: '已处理' }, + { date: '2016年', value: 400, type: '未处理' }, + { date: '2017年', value: 100, type: '未处理' }, + { date: '2018年', value: 200, type: '未处理' }, + { date: '2019年', value: 300, type: '未处理' }, + { date: '2020年', value: 200, type: '未处理' }, + { date: '2021年', value: 100, type: '未处理' }, + { date: '2022年', value: 200, type: '未处理' }, + { date: '2023年', value: 300, type: '未处理' } ] // 配置处理脚本 @@ -656,7 +592,7 @@ const option = { renderer: 'canvas', smooth: true, data, - xField: 'year', + xField: 'date', yField: 'value', seriesField: 'type', legendEnable: false, diff --git a/data-room-ui/packages/G2Plots/折线图/多阶梯折线图.js b/data-room-ui/packages/G2Plots/折线图/多阶梯折线图.js index 92cc2742..5c34dcbb 100644 --- a/data-room-ui/packages/G2Plots/折线图/多阶梯折线图.js +++ b/data-room-ui/packages/G2Plots/折线图/多阶梯折线图.js @@ -441,86 +441,22 @@ const setting = [ // 模拟数据 const data = [ - { - year:'1', - value:100, - type:'今年' - }, - { - year:'2', - value:200, - type:'今年' - }, - { - year:'3', - value:300, - type:'今年' - }, - { - year:'4', - value:200, - type:'今年' - }, - { - year:'5', - value:100, - type:'今年' - }, - { - year:'6', - value:200, - type:'今年' - }, - { - year:'7', - value:300, - type:'今年' - }, - { - year:'8', - value:400, - type:'今年' - }, - { - year:'1', - value:400, - type:'去年' - }, - { - year:'2', - value:100, - type:'去年' - }, - { - year:'3', - value:200, - type:'去年' - }, - { - year:'4', - value:300, - type:'去年' - }, - { - year:'5', - value:200, - type:'去年' - }, - { - year:'6', - value:100, - type:'去年' - }, - { - year:'7', - value:200, - type:'去年' - }, - { - year:'8', - value:300, - type:'去年' - } + { date: '2016年', value: 100, type: '已处理' }, + { date: '2017年', value: 200, type: '已处理' }, + { date: '2018年', value: 300, type: '已处理' }, + { date: '2019年', value: 200, type: '已处理' }, + { date: '2020年', value: 100, type: '已处理' }, + { date: '2021年', value: 200, type: '已处理' }, + { date: '2022年', value: 300, type: '已处理' }, + { date: '2023年', value: 400, type: '已处理' }, + { date: '2016年', value: 400, type: '未处理' }, + { date: '2017年', value: 100, type: '未处理' }, + { date: '2018年', value: 200, type: '未处理' }, + { date: '2019年', value: 300, type: '未处理' }, + { date: '2020年', value: 200, type: '未处理' }, + { date: '2021年', value: 100, type: '未处理' }, + { date: '2022年', value: 200, type: '未处理' }, + { date: '2023年', value: 300, type: '未处理' } ] // 配置处理脚本 @@ -541,7 +477,7 @@ const option = { appendPadding: [0, 0, 0, 0], renderer: 'canvas', data, - xField: 'year', + xField: 'date', yField: 'value', seriesField: 'type', legendEnable: false, diff --git a/data-room-ui/packages/G2Plots/折线图/折线趋势填充图.js b/data-room-ui/packages/G2Plots/折线图/折线趋势填充图.js index d2ee7e52..07004140 100644 --- a/data-room-ui/packages/G2Plots/折线图/折线趋势填充图.js +++ b/data-room-ui/packages/G2Plots/折线图/折线趋势填充图.js @@ -506,86 +506,22 @@ const setting = [ // 模拟数据 const data = [ - { - year:'1', - value:100, - type:'今年' - }, - { - year:'2', - value:200, - type:'今年' - }, - { - year:'3', - value:300, - type:'今年' - }, - { - year:'4', - value:200, - type:'今年' - }, - { - year:'5', - value:100, - type:'今年' - }, - { - year:'6', - value:200, - type:'今年' - }, - { - year:'7', - value:300, - type:'今年' - }, - { - year:'8', - value:400, - type:'今年' - }, - { - year:'1', - value:400, - type:'去年' - }, - { - year:'2', - value:100, - type:'去年' - }, - { - year:'3', - value:200, - type:'去年' - }, - { - year:'4', - value:300, - type:'去年' - }, - { - year:'5', - value:200, - type:'去年' - }, - { - year:'6', - value:100, - type:'去年' - }, - { - year:'7', - value:200, - type:'去年' - }, - { - year:'8', - value:300, - type:'去年' - } + { date: '2016年', value: 100, type: '已处理' }, + { date: '2017年', value: 200, type: '已处理' }, + { date: '2018年', value: 300, type: '已处理' }, + { date: '2019年', value: 200, type: '已处理' }, + { date: '2020年', value: 100, type: '已处理' }, + { date: '2021年', value: 200, type: '已处理' }, + { date: '2022年', value: 300, type: '已处理' }, + { date: '2023年', value: 400, type: '已处理' }, + { date: '2016年', value: 400, type: '未处理' }, + { date: '2017年', value: 100, type: '未处理' }, + { date: '2018年', value: 200, type: '未处理' }, + { date: '2019年', value: 300, type: '未处理' }, + { date: '2020年', value: 200, type: '未处理' }, + { date: '2021年', value: 100, type: '未处理' }, + { date: '2022年', value: 200, type: '未处理' }, + { date: '2023年', value: 300, type: '未处理' } ] // 配置处理脚本 @@ -607,7 +543,7 @@ const option = { renderer: 'canvas', data, color: ['#6b74e4', '#4391f4', '#38bbe5', '#69d6fd', '#36c6a0'], - xField: 'year', + xField: 'date', yField: 'value', seriesField: 'type', xAxis: { diff --git a/data-room-ui/packages/G2Plots/条形图/分组条形图.js b/data-room-ui/packages/G2Plots/条形图/分组条形图.js index 3c2c51b6..15d8f0a0 100644 --- a/data-room-ui/packages/G2Plots/条形图/分组条形图.js +++ b/data-room-ui/packages/G2Plots/条形图/分组条形图.js @@ -509,56 +509,16 @@ const setting = [ // 模拟数据 const data = [ - { - label: 'Mon.', - type: 'series1', - value: 2800 - }, - { - label: 'Mon.', - type: 'series2', - value: 2260 - }, - { - label: 'Tues.', - type: 'series1', - value: 1800 - }, - { - label: 'Tues.', - type: 'series2', - value: 1300 - }, - { - label: 'Wed.', - type: 'series1', - value: 950 - }, - { - label: 'Wed.', - type: 'series2', - value: 900 - }, - { - label: 'Thur.', - type: 'series1', - value: 500 - }, - { - label: 'Thur.', - type: 'series2', - value: 390 - }, - { - label: 'Fri.', - type: 'series1', - value: 170 - }, - { - label: 'Fri.', - type: 'series2', - value: 100 - } + { date: '2019年', value: 200, type: '已处理' }, + { date: '2020年', value: 100, type: '已处理' }, + { date: '2021年', value: 200, type: '已处理' }, + { date: '2022年', value: 300, type: '已处理' }, + { date: '2023年', value: 400, type: '已处理' }, + { date: '2019年', value: 300, type: '未处理' }, + { date: '2020年', value: 200, type: '未处理' }, + { date: '2021年', value: 100, type: '未处理' }, + { date: '2022年', value: 200, type: '未处理' }, + { date: '2023年', value: 300, type: '未处理' } ] // 配置处理脚本 @@ -580,7 +540,7 @@ const option = { isGroup: true, // shape: ' ', xField: 'value', - yField: 'label', + yField: 'date', legendEnable: false, legendLayout: 'vertical', legendPosition: 'top', diff --git a/data-room-ui/packages/G2Plots/条形图/堆叠条形图.js b/data-room-ui/packages/G2Plots/条形图/堆叠条形图.js index dddda5a7..8014b8ca 100644 --- a/data-room-ui/packages/G2Plots/条形图/堆叠条形图.js +++ b/data-room-ui/packages/G2Plots/条形图/堆叠条形图.js @@ -512,56 +512,16 @@ const setting = [ // 模拟数据 const data = [ - { - label: 'Mon.', - type: 'series1', - value: 2800 - }, - { - label: 'Mon.', - type: 'series2', - value: 2260 - }, - { - label: 'Tues.', - type: 'series1', - value: 1800 - }, - { - label: 'Tues.', - type: 'series2', - value: 1300 - }, - { - label: 'Wed.', - type: 'series1', - value: 950 - }, - { - label: 'Wed.', - type: 'series2', - value: 900 - }, - { - label: 'Thur.', - type: 'series1', - value: 500 - }, - { - label: 'Thur.', - type: 'series2', - value: 390 - }, - { - label: 'Fri.', - type: 'series1', - value: 170 - }, - { - label: 'Fri.', - type: 'series2', - value: 100 - } + { date: '2019年', value: 200, type: '已处理' }, + { date: '2020年', value: 100, type: '已处理' }, + { date: '2021年', value: 200, type: '已处理' }, + { date: '2022年', value: 300, type: '已处理' }, + { date: '2023年', value: 400, type: '已处理' }, + { date: '2019年', value: 300, type: '未处理' }, + { date: '2020年', value: 200, type: '未处理' }, + { date: '2021年', value: 100, type: '未处理' }, + { date: '2022年', value: 200, type: '未处理' }, + { date: '2023年', value: 300, type: '未处理' } ] // 配置处理脚本 @@ -583,7 +543,7 @@ const option = { isStack: true, // shape: ' ', xField: 'value', - yField: 'label', + yField: 'date', seriesField: 'type', legendEnable: false, legendLayout: 'vertical', diff --git a/data-room-ui/packages/G2Plots/柱状图/分组柱状图.js b/data-room-ui/packages/G2Plots/柱状图/分组柱状图.js index a72fd7ed..927afef3 100644 --- a/data-room-ui/packages/G2Plots/柱状图/分组柱状图.js +++ b/data-room-ui/packages/G2Plots/柱状图/分组柱状图.js @@ -483,86 +483,18 @@ const setting = [ // 模拟数据 const data = [ - { - year: '1', - value: 100, - type: '今年' - }, - { - year: '2', - value: 200, - type: '今年' - }, - { - year: '3', - value: 300, - type: '今年' - }, - { - year: '4', - value: 200, - type: '今年' - }, - { - year: '5', - value: 100, - type: '今年' - }, - { - year: '6', - value: 200, - type: '今年' - }, - { - year: '7', - value: 300, - type: '今年' - }, - { - year: '8', - value: 400, - type: '今年' - }, - { - year: '1', - value: 400, - type: '去年' - }, - { - year: '2', - value: 100, - type: '去年' - }, - { - year: '3', - value: 200, - type: '去年' - }, - { - year: '4', - value: 300, - type: '去年' - }, - { - year: '5', - value: 200, - type: '去年' - }, - { - year: '6', - value: 100, - type: '去年' - }, - { - year: '7', - value: 200, - type: '去年' - }, - { - year: '8', - value: 300, - type: '去年' - } + { date: '2018年', value: 300, type: '已处理' }, + { date: '2019年', value: 200, type: '已处理' }, + { date: '2020年', value: 100, type: '已处理' }, + { date: '2021年', value: 200, type: '已处理' }, + { date: '2022年', value: 300, type: '已处理' }, + { date: '2023年', value: 400, type: '已处理' }, + { date: '2018年', value: 200, type: '未处理' }, + { date: '2019年', value: 300, type: '未处理' }, + { date: '2020年', value: 200, type: '未处理' }, + { date: '2021年', value: 100, type: '未处理' }, + { date: '2022年', value: 200, type: '未处理' }, + { date: '2023年', value: 300, type: '未处理' } ] // 配置处理脚本 @@ -596,7 +528,7 @@ const option = { legend: false, color: ['#6b74e4', '#4391f4', '#38bbe5', '#69d6fd', '#36c6a0'], isGroup: true, - xField: 'year', + xField: 'date', yField: 'value', seriesField: 'type', /** 设置颜色 */ diff --git a/data-room-ui/packages/G2Plots/柱状图/圆角柱状图.js b/data-room-ui/packages/G2Plots/柱状图/圆角柱状图.js index f783049e..69968898 100644 --- a/data-room-ui/packages/G2Plots/柱状图/圆角柱状图.js +++ b/data-room-ui/packages/G2Plots/柱状图/圆角柱状图.js @@ -483,86 +483,18 @@ const setting = [ // 模拟数据 const data = [ - { - year:'1', - value:100, - type:'今年' - }, - { - year:'2', - value:200, - type:'今年' - }, - { - year:'3', - value:300, - type:'今年' - }, - { - year:'4', - value:200, - type:'今年' - }, - { - year:'5', - value:100, - type:'今年' - }, - { - year:'6', - value:200, - type:'今年' - }, - { - year:'7', - value:300, - type:'今年' - }, - { - year:'8', - value:400, - type:'今年' - }, - { - year:'1', - value:400, - type:'去年' - }, - { - year:'2', - value:100, - type:'去年' - }, - { - year:'3', - value:200, - type:'去年' - }, - { - year:'4', - value:300, - type:'去年' - }, - { - year:'5', - value:200, - type:'去年' - }, - { - year:'6', - value:100, - type:'去年' - }, - { - year:'7', - value:200, - type:'去年' - }, - { - year:'8', - value:300, - type:'去年' - } + { date: '2018年', value: 300, type: '已处理' }, + { date: '2019年', value: 200, type: '已处理' }, + { date: '2020年', value: 100, type: '已处理' }, + { date: '2021年', value: 200, type: '已处理' }, + { date: '2022年', value: 300, type: '已处理' }, + { date: '2023年', value: 400, type: '已处理' }, + { date: '2018年', value: 200, type: '未处理' }, + { date: '2019年', value: 300, type: '未处理' }, + { date: '2020年', value: 200, type: '未处理' }, + { date: '2021年', value: 100, type: '未处理' }, + { date: '2022年', value: 200, type: '未处理' }, + { date: '2023年', value: 300, type: '未处理' } ] // 配置处理脚本 @@ -583,7 +515,7 @@ const option = { appendPadding: [0, 0, 0, 0], renderer: 'canvas', data, - xField: 'year', + xField: 'date', yField: 'value', seriesField: 'type', isGroup: 'true', diff --git a/data-room-ui/packages/G2Plots/柱状图/堆叠柱状图.js b/data-room-ui/packages/G2Plots/柱状图/堆叠柱状图.js index f0f55c7b..27abd9d3 100644 --- a/data-room-ui/packages/G2Plots/柱状图/堆叠柱状图.js +++ b/data-room-ui/packages/G2Plots/柱状图/堆叠柱状图.js @@ -483,24 +483,18 @@ const setting = [ // 模拟数据 const data = [ - { year: '1991', value: 3, type: 'Lon' }, - { year: '1992', value: 4, type: 'Lon' }, - { year: '1993', value: 3.5, type: 'Lon' }, - { year: '1994', value: 5, type: 'Lon' }, - { year: '1995', value: 4.9, type: 'Lon' }, - { year: '1996', value: 6, type: 'Lon' }, - { year: '1997', value: 7, type: 'Lon' }, - { year: '1998', value: 9, type: 'Lon' }, - { year: '1999', value: 13, type: 'Lon' }, - { year: '1991', value: 3, type: 'Bor' }, - { year: '1992', value: 4, type: 'Bor' }, - { year: '1993', value: 3.5, type: 'Bor' }, - { year: '1994', value: 5, type: 'Bor' }, - { year: '1995', value: 4.9, type: 'Bor' }, - { year: '1996', value: 6, type: 'Bor' }, - { year: '1997', value: 7, type: 'Bor' }, - { year: '1998', value: 9, type: 'Bor' }, - { year: '1999', value: 13, type: 'Bor' } + { date: '2018年', value: 300, type: '已处理' }, + { date: '2019年', value: 200, type: '已处理' }, + { date: '2020年', value: 100, type: '已处理' }, + { date: '2021年', value: 200, type: '已处理' }, + { date: '2022年', value: 300, type: '已处理' }, + { date: '2023年', value: 400, type: '已处理' }, + { date: '2018年', value: 200, type: '未处理' }, + { date: '2019年', value: 300, type: '未处理' }, + { date: '2020年', value: 200, type: '未处理' }, + { date: '2021年', value: 100, type: '未处理' }, + { date: '2022年', value: 200, type: '未处理' }, + { date: '2023年', value: 300, type: '未处理' } ] // 配置处理脚本 @@ -522,7 +516,7 @@ const option = { renderer: 'canvas', data, isStack: true, - xField: 'year', + xField: 'date', yField: 'value', seriesField: 'type', legendEnable: false, diff --git a/data-room-ui/packages/G2Plots/面积图/堆叠面积图.js b/data-room-ui/packages/G2Plots/面积图/堆叠面积图.js index 030b2faf..14d282ee 100644 --- a/data-room-ui/packages/G2Plots/面积图/堆叠面积图.js +++ b/data-room-ui/packages/G2Plots/面积图/堆叠面积图.js @@ -551,155 +551,22 @@ const setting = [ // 模拟数据 const data = [ - { - country: '北美', - date: 1965, - value: 1390.5 - }, - { - country: '北美', - date: 1966, - value: 1469.5 - }, - { - country: '北美', - date: 1967, - value: 1521.7 - }, - { - country: '北美', - date: 1968, - value: 1615.9 - }, - { - country: '北美', - date: 1969, - value: 1703.7 - }, - { - country: '中南美', - date: 1965, - value: 109.2 - }, - { - country: '中南美', - date: 1966, - value: 115.7 - }, - { - country: '中南美', - date: 1967, - value: 120.5 - }, - { - country: '中南美', - date: 1968, - value: 128 - }, - { - country: '中南美', - date: 1969, - value: 134.4 - }, - { - country: '欧洲', - date: 1965, - value: 1058.1 - }, - { - country: '欧洲', - date: 1966, - value: 1089.7 - }, - { - country: '欧洲', - date: 1967, - value: 1121.7 - }, - { - country: '欧洲', - date: 1968, - value: 1196.6 - }, - { - country: '欧洲', - date: 1969, - value: 1285.5 - }, - { - country: 'CIS 地区', - date: 1965, - value: 593.3 - }, - { - country: 'CIS 地区', - date: 1966, - value: 630.9 - }, - { - country: 'CIS 地区', - date: 1967, - value: 663.2 - }, - { - country: 'CIS 地区', - date: 1968, - value: 687.8 - }, - { - country: 'CIS 地区', - date: 1969, - value: 719 - }, { - country: '中东', - date: 1965, - value: 48.3 - }, - { - country: '中东', - date: 1966, - value: 50.4 - }, - { - country: '中东', - date: 1967, - value: 52.7 - }, - { - country: '中东', - date: 1968, - value: 55.6 - }, - { - country: '中东', - date: 1969, - value: 58.5 - }, - { - country: '非洲', - date: 1965, - value: 60.6 - }, - { - country: '非洲', - date: 1966, - value: 63.3 - }, - { - country: '非洲', - date: 1967, - value: 64 - }, - { - country: '非洲', - date: 1968, - value: 67.4 - }, - { - country: '非洲', - date: 1969, - value: 68.9 - } + { date: '2016年', value: 100, type: '已处理' }, + { date: '2017年', value: 200, type: '已处理' }, + { date: '2018年', value: 300, type: '已处理' }, + { date: '2019年', value: 200, type: '已处理' }, + { date: '2020年', value: 100, type: '已处理' }, + { date: '2021年', value: 200, type: '已处理' }, + { date: '2022年', value: 300, type: '已处理' }, + { date: '2023年', value: 400, type: '已处理' }, + { date: '2016年', value: 400, type: '未处理' }, + { date: '2017年', value: 100, type: '未处理' }, + { date: '2018年', value: 200, type: '未处理' }, + { date: '2019年', value: 300, type: '未处理' }, + { date: '2020年', value: 200, type: '未处理' }, + { date: '2021年', value: 100, type: '未处理' }, + { date: '2022年', value: 200, type: '未处理' }, + { date: '2023年', value: 300, type: '未处理' } ] // 配置处理脚本 @@ -723,7 +590,7 @@ const option = { xField: 'date', yField: 'value', color: ['#6b74e4', '#4391f4', '#38bbe5', '#69d6fd', '#36c6a0'], - seriesField: 'country', + seriesField: 'type', smooth: false, legendEnable: false, legendLayout: 'vertical', From bb5ba79e4ed89b728c05f43e0adb80d092e923a8 Mon Sep 17 00:00:00 2001 From: "hong.yang" Date: Wed, 15 Nov 2023 11:45:35 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E9=A5=BC=E5=9B=BE=E3=80=81=E8=AF=8D?= =?UTF-8?q?=E4=BA=91=E5=9B=BE=E3=80=81=E9=9B=B7=E8=BE=BE=E5=9B=BE=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E9=BB=98=E8=AE=A4=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../G2Plots/玉珏图/基础玉珏图.js | 20 +- .../packages/G2Plots/词云图/词云图.js | 548 ++---------------- .../G2Plots/雷达图/分组雷达图.js | 49 +- .../G2Plots/雷达图/基础雷达图.js | 24 +- .../packages/G2Plots/饼图/基础饼图.js | 4 + 5 files changed, 95 insertions(+), 550 deletions(-) diff --git a/data-room-ui/packages/G2Plots/玉珏图/基础玉珏图.js b/data-room-ui/packages/G2Plots/玉珏图/基础玉珏图.js index adf8dcc0..cfc2f670 100644 --- a/data-room-ui/packages/G2Plots/玉珏图/基础玉珏图.js +++ b/data-room-ui/packages/G2Plots/玉珏图/基础玉珏图.js @@ -163,14 +163,12 @@ const setting = [ // 模拟数据 const data = [ - { name: 'X6', star: 297 }, - { name: 'G', star: 506 }, - { name: 'AVA', star: 805 }, - { name: 'G2Plot', star: 1478 }, - { name: 'L7', star: 2029 }, - { name: 'G6', star: 7100 }, - { name: 'F2', star: 7346 }, - { name: 'G2', star: 10178 }, + { type: '分类一', value: 27 }, + { type: '分类二', value: 25 }, + { type: '分类三', value: 18 }, + { type: '分类四', value: 15 }, + { type: '分类五', value: 10 }, + { type: '其他', value: 5 } ] const optionHandler = ` @@ -190,13 +188,13 @@ const option = { // 图表内边距 appendPadding: [0, 0, 0, 0], data, - xField: 'name', - yField: 'star', + xField: 'type', + yField: 'value', startAngle: - Math.PI / 2, // 起始角度 maxAngle: 270, //最大旋转角度, radius: 0.8, color: [], - colorField: 'name', + colorField: 'type', innerRadius: 0.2, barStyle: { lineCap: 'round', // 可选项:round 和 square diff --git a/data-room-ui/packages/G2Plots/词云图/词云图.js b/data-room-ui/packages/G2Plots/词云图/词云图.js index 7c124ba5..d53d691f 100644 --- a/data-room-ui/packages/G2Plots/词云图/词云图.js +++ b/data-room-ui/packages/G2Plots/词云图/词云图.js @@ -1,6 +1,6 @@ // 配置版本号 -const version = '2023111401' +const version = '2023111501' // 分类 const category = 'WordCloud' // 标题 @@ -70,7 +70,7 @@ const setting = [ type: 'inputNumber', field: 'fontSizeMin', optionField: 'fontSizeMin', - value: 24, + value: 18, tabName: 'custom', groupName: 'graph' }, @@ -79,7 +79,7 @@ const setting = [ type: 'inputNumber', field: 'fontSizeMax', optionField: 'fontSizeMax', - value: 80, + value: 60, tabName: 'custom', groupName: 'graph' }, @@ -96,514 +96,50 @@ const setting = [ } ] -// 模拟数据 const data = [ - { - x: 'China', - value: 1383220000, - category: 'asia' - }, - { - x: 'India', - value: 1316000000, - category: 'asia' - }, - { - x: 'United States', - value: 324982000, - category: 'america' - }, - { - x: 'Indonesia', - value: 263510000, - category: 'asia' - }, - { - x: 'Brazil', - value: 207505000, - category: 'america' - }, - { - x: 'Pakistan', - value: 196459000, - category: 'asia' - }, - { - x: 'Nigeria', - value: 191836000, - category: 'africa' - }, - { - x: 'Bangladesh', - value: 162459000, - category: 'asia' - }, - { - x: 'Russia', - value: 146804372, - category: 'europe' - }, - { - x: 'Japan', - value: 126790000, - category: 'asia' - }, - { - x: 'Mexico', - value: 123518000, - category: 'america' - }, - { - x: 'Ethiopia', - value: 104345000, - category: 'africa' - }, - { - x: 'Philippines', - value: 104037000, - category: 'asia' - }, - { - x: 'Egypt', - value: 93013300, - category: 'africa' - }, - { - x: 'Vietnam', - value: 92700000, - category: 'asia' - }, - { - x: 'Germany', - value: 82800000, - category: 'europe' - }, - { - x: 'Democratic Republic of the Congo', - value: 82243000, - category: 'africa' - }, - { - x: 'Iran', - value: 80135400, - category: 'asia' - }, - { - x: 'Turkey', - value: 79814871, - category: 'asia' - }, - { - x: 'Thailand', - value: 68298000, - category: 'asia' - }, - { - x: 'France', - value: 67013000, - category: 'europe' - }, - { - x: 'United Kingdom', - value: 65110000, - category: 'europe' - }, - { - x: 'Italy', - value: 60599936, - category: 'europe' - }, - { - x: 'Tanzania', - value: 56878000, - category: 'africa' - }, - { - x: 'South Africa', - value: 55908000, - category: 'africa' - }, - { - x: 'Myanmar', - value: 54836000, - category: 'asia' - }, - { - x: 'South Korea', - value: 51446201, - category: 'asia' - }, - { - x: 'Colombia', - value: 49224700, - category: 'america' - }, - { - x: 'Kenya', - value: 48467000, - category: 'africa' - }, - { - x: 'Spain', - value: 46812000, - category: 'europe' - }, - { - x: 'Argentina', - value: 43850000, - category: 'america' - }, - { - x: 'Ukraine', - value: 42541633, - category: 'europe' - }, - { - x: 'Sudan', - value: 42176000, - category: 'africa' - }, - { - x: 'Uganda', - value: 41653000, - category: 'africa' - }, - { - x: 'Algeria', - value: 41064000, - category: 'africa' - }, - { - x: 'Poland', - value: 38424000, - category: 'europe' - }, - { - x: 'Iraq', - value: 37883543, - category: 'asia' - }, - { - x: 'Canada', - value: 36541000, - category: 'america' - }, - { - x: 'Morocco', - value: 34317500, - category: 'africa' - }, - { - x: 'Saudi Arabia', - value: 33710021, - category: 'asia' - }, - { - x: 'Uzbekistan', - value: 32121000, - category: 'asia' - }, - { - x: 'Malaysia', - value: 32063200, - category: 'asia' - }, - { - x: 'Peru', - value: 31826018, - category: 'america' - }, - { - x: 'Venezuela', - value: 31431164, - category: 'america' - }, - { - x: 'Nepal', - value: 28825709, - category: 'asia' - }, - { - x: 'Angola', - value: 28359634, - category: 'africa' - }, - { - x: 'Ghana', - value: 28308301, - category: 'africa' - }, - { - x: 'Yemen', - value: 28120000, - category: 'asia' - }, - { - x: 'Afghanistan', - value: 27657145, - category: 'asia' - }, - { - x: 'Mozambique', - value: 27128530, - category: 'africa' - }, - { - x: 'Australia', - value: 24460900, - category: 'australia' - }, - { - x: 'North Korea', - value: 24213510, - category: 'asia' - }, - { - x: 'Cameroon', - value: 23248044, - category: 'africa' - }, - { - x: 'Ivory Coast', - value: 22671331, - category: 'africa' - }, - { - x: 'Madagascar', - value: 22434363, - category: 'africa' - }, - { - x: 'Niger', - value: 21564000, - category: 'africa' - }, - { - x: 'Sri Lanka', - value: 21203000, - category: 'asia' - }, - { - x: 'Romania', - value: 19760000, - category: 'europe' - }, - { - x: 'Burkina Faso', - value: 19632147, - category: 'africa' - }, - { - x: 'Syria', - value: 18907000, - category: 'asia' - }, - { - x: 'Mali', - value: 18875000, - category: 'africa' - }, - { - x: 'Malawi', - value: 18299000, - category: 'africa' - }, - { - x: 'Chile', - value: 18191900, - category: 'america' - }, - { - x: 'Kazakhstan', - value: 17975800, - category: 'asia' - }, - { - x: 'Netherlands', - value: 17121900, - category: 'europe' - }, - { - x: 'Ecuador', - value: 16737700, - category: 'america' - }, - { - x: 'Guatemala', - value: 16176133, - category: 'america' - }, - { - x: 'Zambia', - value: 15933883, - category: 'africa' - }, - { - x: 'Cambodia', - value: 15626444, - category: 'asia' - }, - { - x: 'Senegal', - value: 15256346, - category: 'africa' - }, - { - x: 'Chad', - value: 14965000, - category: 'africa' - }, - { - x: 'Zimbabwe', - value: 14542235, - category: 'africa' - }, - { - x: 'Guinea', - value: 13291000, - category: 'africa' - }, - { - x: 'South Sudan', - value: 12131000, - category: 'africa' - }, - { - x: 'Rwanda', - value: 11553188, - category: 'africa' - }, - { - x: 'Belgium', - value: 11356191, - category: 'europe' - }, - { - x: 'Tunisia', - value: 11299400, - category: 'africa' - }, - { - x: 'Cuba', - value: 11239004, - category: 'america' - }, - { - x: 'Bolivia', - value: 11145770, - category: 'america' - }, - { - x: 'Somalia', - value: 11079000, - category: 'africa' - }, - { - x: 'Haiti', - value: 11078033, - category: 'america' - }, - { - x: 'Greece', - value: 10783748, - category: 'europe' - }, - { - x: 'Benin', - value: 10653654, - category: 'africa' - }, - { - x: 'Czech Republic', - value: 10578820, - category: 'europe' - }, - { - x: 'Portugal', - value: 10341330, - category: 'europe' - }, - { - x: 'Burundi', - value: 10114505, - category: 'africa' - }, - { - x: 'Dominican Republic', - value: 10075045, - category: 'america' - }, - { - x: 'Sweden', - value: 10054100, - category: 'europe' - }, - { - x: 'United Arab Emirates', - value: 10003223, - category: 'asia' - }, - { - x: 'Jordan', - value: 9889270, - category: 'asia' - }, - { - x: 'Azerbaijan', - value: 9823667, - category: 'asia' - }, - { - x: 'Hungary', - value: 9799000, - category: 'europe' - }, - { - x: 'Belarus', - value: 9498600, - category: 'europe' - }, - { - x: 'Honduras', - value: 8866351, - category: 'america' - }, - { - x: 'Austria', - value: 8773686, - category: 'europe' - }, - { - x: 'Tajikistan', - value: 8742000, - category: 'asia' - }, - { - x: 'Israel', - value: 8690220, - category: 'asia' - }, - { - x: 'Switzerland', - value: 8417700, - category: 'europe' - }, - { - x: 'Papua New Guinea', - value: 8151300, - category: 'australia' - } + { name: '大屏设计器', value: 9900 }, + { name: '折线图', value: 6181 }, + { name: '柱状图', value: 4386 }, + { name: '饼图', value: 4055 }, + { name: '散点图', value: 2467 }, + { name: '雷达图', value: 2244 }, + { name: '树图', value: 1898 }, + { name: '面积图', value: 1484 }, + { name: '地图', value: 1112 }, + { name: '热力图', value: 965 }, + { name: '仪表盘', value: 847 }, + { name: '漏斗图', value: 582 }, + { name: '进度条', value: 555 }, + { name: '环图', value: 550 }, + { name: '玉珏图', value: 462 }, + { name: '词云', value: 366 }, + { name: '3D组件', value: 360 }, + { name: '边框', value: 282 }, + { name: '装饰', value: 273 }, + { name: '自定义组件', value: 1265 }, + { name: '文本', value: 6181 }, + { name: '数字', value: 4386 }, + { name: '超链接', value: 1222 }, + { name: '图片', value: 2438 }, + { name: '视频', value: 1361 }, + { name: '表格', value: 9876 }, + { name: '排名', value: 1112 }, + { name: '轮播', value: 965 }, + { name: '时间', value: 2847 }, + { name: '跑马灯', value: 582 }, + { name: '指标卡', value: 555 } ] // 配置处理脚本 -const optionHandler = 'option.wordStyle.fontSize = [option.fontSizeMin, option.fontSizeMax]' - -// 数据处理脚本 -const dataHandler = 'let wordFieldValue = setting.find(settingItem=>settingItem.field === \'wordField\').value\n' + +const optionHandler = 'option.wordStyle.fontSize = [option.fontSizeMin, option.fontSizeMax]\n' + + 'let wordFieldValue = setting.find(settingItem=>settingItem.field === \'wordField\').value\n' + 'if (wordFieldValue) {\n' + ' option.colorField = wordFieldValue\n' + '}' +// 数据处理脚本 +const dataHandler = '' + // 图表配置 new Line('domName', option) const option = { // 数据将要放入到哪个字段中 @@ -611,13 +147,13 @@ const option = { // 图表内边距 appendPadding: [0, 0, 0, 0], data, - wordField: 'x', + wordField: 'name', weightField: 'value', - colorField: 'category', + colorField: 'name', color: ['#6b74e4', '#4391f4', '#38bbe5', '#69d6fd', '#36c6a0'], wordStyle: { fontFamily: 'Verdana', - fontSize: [24, 80] + fontSize: [12, 60] }, fontSizeMin: 24, fontSizeMax: 80, diff --git a/data-room-ui/packages/G2Plots/雷达图/分组雷达图.js b/data-room-ui/packages/G2Plots/雷达图/分组雷达图.js index be5aa501..e00d41ca 100644 --- a/data-room-ui/packages/G2Plots/雷达图/分组雷达图.js +++ b/data-room-ui/packages/G2Plots/雷达图/分组雷达图.js @@ -1,6 +1,6 @@ // 配置版本号 -const version = '2023111401' +const version = '2023111501' // 分类 const category = 'Radar' // 标题 @@ -231,6 +231,15 @@ const setting = [ tabName: 'custom', groupName: 'legend' }, + { + label: 'y轴最小值', + type: 'inputNumber', + field: 'yAxis_min', + optionField: 'yAxis.min', + value: 0, + tabName: 'custom', + groupName: 'yAxis' + }, // 内边距 appendPadding { label: '', @@ -245,28 +254,17 @@ const setting = [ // 模拟数据 const data = [ - { item: 'Design', user: 'a', score: 70 }, - { item: 'Design', user: 'b', score: 30 }, - { item: 'Development', user: 'a', score: 60 }, - { item: 'Development', user: 'b', score: 70 }, - { item: 'Marketing', user: 'a', score: 50 }, - { item: 'Marketing', user: 'b', score: 60 }, - { item: 'Users', user: 'a', score: 40 }, - { item: 'Users', user: 'b', score: 50 }, - { item: 'Test', user: 'a', score: 60 }, - { item: 'Test', user: 'b', score: 70 }, - { item: 'Language', user: 'a', score: 70 }, - { item: 'Language', user: 'b', score: 50 }, - { item: 'Technology', user: 'a', score: 50 }, - { item: 'Technology', user: 'b', score: 40 }, - { item: 'Support', user: 'a', score: 30 }, - { item: 'Support', user: 'b', score: 40 }, - { item: 'Sales', user: 'a', score: 60 }, - { item: 'Sales', user: 'b', score: 40 }, - { item: 'UX', user: 'a', score: 50 }, - { item: 'UX', user: 'b', score: 60 } + { name: '支撑及时性', star: 300, type: '当前得分' }, + { name: '基本能力', star: 450, type: '当前得分' }, + { name: '支撑规范性', star: 200, type: '当前得分' }, + { name: '满意度', star: 420, type: '当前得分' }, + { name: '工作质量', star: 380, type: '当前得分' }, + { name: '支撑及时性', star: 380, type: '平均得分' }, + { name: '基本能力', star: 420, type: '平均得分' }, + { name: '支撑规范性', star: 300, type: '平均得分' }, + { name: '满意度', star: 350, type: '平均得分' }, + { name: '工作质量', star: 400, type: '平均得分' } ] - // 配置处理脚本 const optionHandler = 'option.legend = option.legendEnable ? {position: setting.find(settingItem=>settingItem.field === \'legendPosition\').value} : false;' + '\n if (option.legendEnable) {\n' + @@ -284,9 +282,9 @@ const option = { appendPadding: [0, 0, 0, 0], renderer: 'canvas', data, - xField: 'item', - yField: 'score', - seriesField: 'user', + xField: 'name', + yField: 'star', + seriesField: 'type', legendEnable: false, legendLayout: 'vertical', legendPosition: 'top', @@ -325,6 +323,7 @@ const option = { size: 2 }, yAxis: { + min: 0, label: false, grid: { alternateColor: 'rgba(0, 0, 0, 0.04)' diff --git a/data-room-ui/packages/G2Plots/雷达图/基础雷达图.js b/data-room-ui/packages/G2Plots/雷达图/基础雷达图.js index 8c9ebbc1..a3e85013 100644 --- a/data-room-ui/packages/G2Plots/雷达图/基础雷达图.js +++ b/data-room-ui/packages/G2Plots/雷达图/基础雷达图.js @@ -1,6 +1,6 @@ // 配置版本号 -const version = '2023111401' +const version = '2023111501' // 分类 const category = 'Radar' // 标题 @@ -214,6 +214,15 @@ const setting = [ tabName: 'custom', groupName: 'grid' }, + { + label: 'y轴最小值', + type: 'inputNumber', + field: 'yAxis_min', + optionField: 'yAxis.min', + value: 0, + tabName: 'custom', + groupName: 'yAxis' + }, // 内边距 appendPadding { label: '', @@ -228,13 +237,11 @@ const setting = [ // 模拟数据 const data = [ - { name: 'G2', star: 10371 }, - { name: 'G6', star: 7380 }, - { name: 'F2', star: 7414 }, - { name: 'L7', star: 2140 }, - { name: 'X6', star: 660 }, - { name: 'AVA', star: 885 }, - { name: 'G2Plot', star: 1626 } + { name: '支撑及时性', star: 300 }, + { name: '基本能力', star: 450 }, + { name: '支撑规范性', star: 200 }, + { name: '满意度', star: 420 }, + { name: '工作质量', star: 380 }, ] // 配置处理脚本 @@ -290,6 +297,7 @@ const option = { yAxis: { // line: null, tickLine: null, + min: 0, label: false, grid: { line: { diff --git a/data-room-ui/packages/G2Plots/饼图/基础饼图.js b/data-room-ui/packages/G2Plots/饼图/基础饼图.js index f315f83c..6f7cd869 100644 --- a/data-room-ui/packages/G2Plots/饼图/基础饼图.js +++ b/data-room-ui/packages/G2Plots/饼图/基础饼图.js @@ -270,6 +270,10 @@ const option = { } }, color: ['#6b74e4', '#4391f4', '#38bbe5', '#69d6fd', '#36c6a0'], + pieStyle: { + stroke: '#000000', + lineWidth: 0 + }, label: { autoRotate: true, type: 'inner', From 097db38403b52546b4b0af90b2a9d8c18b8156cb Mon Sep 17 00:00:00 2001 From: "hong.yang" Date: Wed, 15 Nov 2023 11:45:58 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=E5=9C=B0=E5=9B=BE=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E9=A2=9C=E8=89=B2=E9=85=8D=E7=BD=AE=E9=A1=B9=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data-room-ui/packages/BasicComponents/Map/setting.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/data-room-ui/packages/BasicComponents/Map/setting.vue b/data-room-ui/packages/BasicComponents/Map/setting.vue index 71e584cf..1623ee52 100644 --- a/data-room-ui/packages/BasicComponents/Map/setting.vue +++ b/data-room-ui/packages/BasicComponents/Map/setting.vue @@ -422,7 +422,7 @@ @click="addColor" />