From ea62dc8987ee954df4db08c5e78d36fbaf3281c0 Mon Sep 17 00:00:00 2001 From: xiaowen <372193233@qq.com> Date: Thu, 8 Sep 2022 09:40:16 +0800 Subject: [PATCH] cxw-010203 --- components/option/circleOption.js | 11 ++++++- components/option/multiColumnsOption.js | 9 ++++++ components/option/multipleColumn.js | 12 ++++++-- components/option/negaposiOption.js | 12 ++++++-- components/option/negaposiOption2.js | 12 ++++++-- components/option/percentRankOption.js | 10 +++++++ components/option/pictographicOption.js | 4 ++- components/option/pictographicOption2.js | 2 ++ components/option/pointOption.js | 12 ++++++++ components/option/raydarOption.js | 36 ++++++++++++++--------- components/option/sgOption.js | 4 ++- components/option/singleColumnarOption.js | 9 ++++-- components/option/singleLineOption.js | 12 ++++++++ components/option/singlePercent.js | 10 +++++++ components/option/splitOption.js | 13 +++++--- components/option/stackedBarChart.js | 12 ++++++-- 16 files changed, 145 insertions(+), 35 deletions(-) diff --git a/components/option/circleOption.js b/components/option/circleOption.js index 30b2c6c..f583c35 100644 --- a/components/option/circleOption.js +++ b/components/option/circleOption.js @@ -2,7 +2,16 @@ export default function circleOption(data=[]){ return{ tooltip: { - trigger: 'item' + trigger: 'item', + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + fontSize: 9 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;", + confine: true }, series: [ { diff --git a/components/option/multiColumnsOption.js b/components/option/multiColumnsOption.js index d378386..56bbcde 100644 --- a/components/option/multiColumnsOption.js +++ b/components/option/multiColumnsOption.js @@ -16,6 +16,15 @@ export default function multiColumnsOption(dx=[], dValue=[], dName=[]) { return { tooltip: { trigger: 'axis', + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + fontSize: 9 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;", + confine: true, axisPointer: { // Use axis to trigger tooltip type: 'line' // 'shadow' as default; can also be 'line' or 'shadow' diff --git a/components/option/multipleColumn.js b/components/option/multipleColumn.js index 6d6188a..6517402 100644 --- a/components/option/multipleColumn.js +++ b/components/option/multipleColumn.js @@ -19,9 +19,15 @@ export default function multipleColumn(columnName = [], xMsg = [], data = []) { const option = { tooltip: { trigger: 'axis', - axisPointer: { - type: 'shadow' - } + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + fontSize: 9 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;", + confine: true }, legend: { data: columnName, diff --git a/components/option/negaposiOption.js b/components/option/negaposiOption.js index eefc89c..9814fe2 100644 --- a/components/option/negaposiOption.js +++ b/components/option/negaposiOption.js @@ -13,9 +13,15 @@ export default function negaposiOption(dName=[], dPositive=[], dNegative = []) { return { tooltip: { trigger: 'axis', - axisPointer: { - type: 'shadow' - } + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + fontSize: 9 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;", + confine: true }, legend: { data: ['正面调性', '负面调性'] diff --git a/components/option/negaposiOption2.js b/components/option/negaposiOption2.js index 5f9ab84..6b19f86 100644 --- a/components/option/negaposiOption2.js +++ b/components/option/negaposiOption2.js @@ -75,9 +75,15 @@ export default function negaposiOption(dName = [], data = {}) { return { tooltip: { trigger: 'axis', - axisPointer: { - type: 'shadow' - } + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + fontSize: 9 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;", + confine: true }, legend: { data: msg, diff --git a/components/option/percentRankOption.js b/components/option/percentRankOption.js index 8dd970d..c5bd498 100644 --- a/components/option/percentRankOption.js +++ b/components/option/percentRankOption.js @@ -2,6 +2,16 @@ export default function pictographicOption(dRegion=[],dValue=[]){ return { tooltip: { + trigger: "item", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + fontSize: 9 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;", + confine: true }, xAxis: { show:false, diff --git a/components/option/pictographicOption.js b/components/option/pictographicOption.js index 825fc56..485d7e6 100644 --- a/components/option/pictographicOption.js +++ b/components/option/pictographicOption.js @@ -2,7 +2,7 @@ export default function pictographicOption(dRegion = [], dValue = [], dSum = 0) { return { tooltip: { - trigger: "item", + trigger: "axis", backgroundColor: "#08182F", color: "#fff", borderColor: "#3373CC", @@ -10,6 +10,8 @@ export default function pictographicOption(dRegion = [], dValue = [], dSum = 0) color: "#fff", //设置文字颜色 fontSize: 9 }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;", + confine: true }, xAxis: { show: false, diff --git a/components/option/pictographicOption2.js b/components/option/pictographicOption2.js index 80ecc2e..42a9ad0 100644 --- a/components/option/pictographicOption2.js +++ b/components/option/pictographicOption2.js @@ -13,6 +13,8 @@ export default function pictographicOption(dRegion = [], dValue = [], dSum = 0) color: "#fff", //设置文字颜色 fontSize: 9 }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;", + confine: true }, xAxis: { show: false, diff --git a/components/option/pointOption.js b/components/option/pointOption.js index aa521f5..3d42b97 100644 --- a/components/option/pointOption.js +++ b/components/option/pointOption.js @@ -9,6 +9,18 @@ export default function pointOption(data=[],dName = [],dx = []) { // left: '8%', // top: '10%' }, + tooltip: { + trigger: 'axis', + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + fontSize: 9 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;", + confine: true + }, xAxis: { data: dx, axisLabel: { diff --git a/components/option/raydarOption.js b/components/option/raydarOption.js index 3457207..7b2589a 100644 --- a/components/option/raydarOption.js +++ b/components/option/raydarOption.js @@ -1,9 +1,9 @@ // 雷达图 -export default function raydarOption(dName = [], dValue = []){ +export default function raydarOption(dName = [], dValue = []) { let arr = []; let maxNum = 0; dValue.forEach(ele => { - if(ele >= maxNum) { + if (ele >= maxNum) { maxNum = ele * 1 } }) @@ -15,18 +15,26 @@ export default function raydarOption(dName = [], dValue = []){ arr.push(obj) }) return { - radar: { + radar: { indicator: arr - }, - series: [ - { - type: 'radar', - data: [ - { - value: dValue, - }, - ] - } - ] + }, + tooltip: { + trigger: "item", + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + fontSize: 9 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;", + confine: true + }, + series: [{ + type: 'radar', + data: [{ + value: dValue, + }, ] + }] } } \ No newline at end of file diff --git a/components/option/sgOption.js b/components/option/sgOption.js index c49bce3..9c48967 100644 --- a/components/option/sgOption.js +++ b/components/option/sgOption.js @@ -15,7 +15,9 @@ export default function singleLine(dValue = [], dx = []) { textStyle: { color: "#fff", //设置文字颜色 fontSize: 9 - } + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;", + confine: true }, yAxis: [{ type: 'value', diff --git a/components/option/singleColumnarOption.js b/components/option/singleColumnarOption.js index 5601674..fb14924 100644 --- a/components/option/singleColumnarOption.js +++ b/components/option/singleColumnarOption.js @@ -4,9 +4,14 @@ export default function histogram(dx = [], ds = [], data = [], color1 = '', dire return { tooltip: { trigger: 'axis', - axisPointer: { // 坐标轴指示器,坐标轴触发有效 - type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + fontSize: 9 }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;", confine: true }, legend: { diff --git a/components/option/singleLineOption.js b/components/option/singleLineOption.js index 4da9e74..435a9f2 100644 --- a/components/option/singleLineOption.js +++ b/components/option/singleLineOption.js @@ -7,6 +7,18 @@ export default function brokenLine(dValue = [], dx = []) { height: 150, width: 320 }, + tooltip: { + trigger: 'axis', + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + fontSize: 9 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;", + confine: true + }, yAxis: [{ type: 'value', axisTick: { diff --git a/components/option/singlePercent.js b/components/option/singlePercent.js index f96c6bd..97fee3f 100644 --- a/components/option/singlePercent.js +++ b/components/option/singlePercent.js @@ -2,6 +2,16 @@ export default function singlePercent(dRegion=[],dValue=[]){ return { tooltip: { + trigger: 'item', + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + fontSize: 9 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;", + confine: true }, xAxis: { show:false, diff --git a/components/option/splitOption.js b/components/option/splitOption.js index df246ce..c8dde59 100644 --- a/components/option/splitOption.js +++ b/components/option/splitOption.js @@ -26,10 +26,15 @@ export default function splitOption(dataNodes = [],dataEdges=[]) { return { tooltip: { trigger: "item", - color: "#333", - textStyle: { - color: "#333", //设置文字颜色 - }, + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + fontSize: 9 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;", + confine: true }, title: { show: false, diff --git a/components/option/stackedBarChart.js b/components/option/stackedBarChart.js index 99414ae..7fd5e09 100644 --- a/components/option/stackedBarChart.js +++ b/components/option/stackedBarChart.js @@ -31,9 +31,15 @@ export default function stack(yName=[],data=[],color=[]){ }, tooltip: { trigger: 'axis', - axisPointer: { - type: 'shadow' - } + backgroundColor: "#08182F", + color: "#fff", + borderColor: "#3373CC", + textStyle: { + color: "#fff", //设置文字颜色 + fontSize: 9 + }, + extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;", + confine: true }, grid: { },