prod
lily.zhang 3 years ago
parent 2d3fb01a72
commit 247b985ec0

@ -1,7 +1,7 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-10-21 11:36:36 * @Date: 2021-10-21 11:36:36
* @LastEditTime: 2021-11-11 15:03:09 * @LastEditTime: 2021-11-12 16:40:03
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /data-show/src/utils/gol/bubbleWord.js * @FilePath: /data-show/src/utils/gol/bubbleWord.js
@ -40,19 +40,19 @@ function bubbleChart(data = [], format = []) {
// 气泡数据 // 气泡数据
let bubbleData = []; let bubbleData = [];
// 气泡基础大小 // 气泡基础大小
let basicSize = 30; let basicSize = 20;
// 节点之间的斥力因子,值越大,气泡间距越大 // 节点之间的斥力因子,值越大,气泡间距越大
let repulsion = 380; let repulsion = 380;
// 根据气泡数量配置基础大小和斥力因子(以实际情况进行适当调整,使气泡合理分布) // 根据气泡数量配置基础大小和斥力因子(以实际情况进行适当调整,使气泡合理分布)
if (data.length >= 5 && data.length < 10) { if (data.length >= 5 && data.length < 10) {
basicSize = 30; basicSize = 20;
repulsion = 230; repulsion = 230;
} }
if (data.length >= 10 && data.length < 20) { if (data.length >= 10 && data.length < 20) {
basicSize = 40; basicSize = 30;
repulsion = 150; repulsion = 150;
} else if (data.length >= 20) { } else if (data.length >= 20) {
basicSize = 50; basicSize = 40;
repulsion = 65; repulsion = 65;
} }
// 填充气泡数据数组bubbleData // 填充气泡数据数组bubbleData

@ -3,12 +3,13 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-10-09 12:38:34 * @Date: 2021-10-09 12:38:34
* @LastEditTime: 2021-10-14 11:48:19 * @LastEditTime: 2021-11-12 16:35:31
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /data-show/src/views/Index/tailInsight/opt.js * @FilePath: /data-show/src/views/Index/tailInsight/opt.js
*/ */
import * as echarts from "echarts"; import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
export default function createOptD1(dx = [],ds = []) { export default function createOptD1(dx = [],ds = []) {
return { return {
grid: { grid: {
@ -36,6 +37,12 @@ export default function createOptD1(dx = [],ds = []) {
color: "#fff", color: "#fff",
}, },
}, },
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: { splitLine: {
lineStyle: { lineStyle: {
type: "dashed", // y轴分割线类型 type: "dashed", // y轴分割线类型
@ -61,7 +68,7 @@ export default function createOptD1(dx = [],ds = []) {
{ {
name: '2011', name: '2011',
type: 'bar', type: 'bar',
barWidth: 24, barWidth: 16,
data: ds, data: ds,
color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{ color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
offset: 0, offset: 0,

Loading…
Cancel
Save