From 234c83d83c8835667c97c962d201ab4a3ce868b8 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期三, 25 十二月 2024 17:47:45 +0800 Subject: [PATCH] 数据获取逻辑迁移至stores --- src/utils/map/grid.js | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/src/utils/map/grid.js b/src/utils/map/grid.js index e5d5273..bb3807f 100644 --- a/src/utils/map/grid.js +++ b/src/utils/map/grid.js @@ -185,6 +185,26 @@ }, drawGridColor(gridViews, texts, factorName) { + // new Promise((resolve, reject) => { + // gridViews.forEach((g, i) => { + // const data = parseFloat(texts[i]); + // const { color, nextColor, range, nextRange } = + // Legend.getStandardColorAndNext(factorName, data); + // const ratio = (data - range) / (nextRange - range); + // const _color = getColorBetweenTwoColors( + // color.map((v) => v * 255), + // nextColor.map((v) => v * 255), + // ratio + // ); + // resolve({ g, _color, color }); + // }); + // }).then((res) => { + // const { g, _color, color } = res; + // g.setOptions({ + // fillColor: _color, + // fillOpacity: color[3] + // }); + // }); gridViews.forEach((g, i) => { const data = parseFloat(texts[i]); const { color, nextColor, range, nextRange } = -- Gitblit v1.9.3