prod
lily.zhang 3 years ago
parent f0c0bd68b9
commit d1f7bc130a

@ -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-10-21 11:43:38 * @LastEditTime: 2021-10-29 12:01:52
* @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
@ -21,6 +21,7 @@ function bubbleChart(data = [], format = []) {
data.forEach((item) => { data.forEach((item) => {
temp.push(item[format[1]]); temp.push(item[format[1]]);
}); });
console.log(data)
maxValue = Math.max.apply(null, temp); maxValue = Math.max.apply(null, temp);
// 气泡颜色数组 // 气泡颜色数组
let color = [ let color = [
@ -39,12 +40,12 @@ function bubbleChart(data = [], format = []) {
// 气泡数据 // 气泡数据
let bubbleData = []; let bubbleData = [];
// 气泡基础大小 // 气泡基础大小
let basicSize = 70; let basicSize = 30;
// 节点之间的斥力因子,值越大,气泡间距越大 // 节点之间的斥力因子,值越大,气泡间距越大
let repulsion = 380; let repulsion = 380;
// 根据气泡数量配置基础大小和斥力因子(以实际情况进行适当调整,使气泡合理分布) // 根据气泡数量配置基础大小和斥力因子(以实际情况进行适当调整,使气泡合理分布)
if (data.length >= 5 && data.length < 10) { if (data.length >= 5 && data.length < 10) {
basicSize = 50; basicSize = 30;
repulsion = 230; repulsion = 230;
} }
if (data.length >= 10 && data.length < 20) { if (data.length >= 10 && data.length < 20) {

Loading…
Cancel
Save