From a2b3c6a8590097430691520a7e3c97487a830561 Mon Sep 17 00:00:00 2001 From: Davont Date: Tue, 2 Jul 2024 21:03:58 +0800 Subject: [PATCH] fix(chart): [chart] Fixed chart-core bug (#1706) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 【Charts】update charts snapshots * fix: 修复图表height为100%时的高度问题 * fix: 优化图表extend逻辑 * fix: 修复图表extend失效问题 * fix: 删除注释 * fix: 新增图表echartOption变量,以便用户获取echart配置 * fix: 修复playground百度地图案例错误问题 * fix: 修复图表option复杂变量失效问题 * fix: 修改高德百度地图案例注释 * fix: chart-core添加cloneDeep引入 * fix: 修改chart组件getFormatted函数判断逻辑 * fix: 更新chart-core包版本为3.17.1 --- packages/vue/src/chart/chart-core/common/util.ts | 2 +- packages/vue/src/chart/chart-core/package.json | 2 +- packages/vue/src/chart/chart-core/src/chart-core.ts | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/vue/src/chart/chart-core/common/util.ts b/packages/vue/src/chart/chart-core/common/util.ts index 6163e7bed..bbbc95033 100644 --- a/packages/vue/src/chart/chart-core/common/util.ts +++ b/packages/vue/src/chart/chart-core/common/util.ts @@ -14,7 +14,7 @@ export function toUpperCase(str) { } export const getFormatted = (value, type, digit, defaultVal = '-') => { - if (typeof value === 'object') { + if (typeof value === 'object' && !isNull(value)) { value = value.value } if (isNaN(value)) { diff --git a/packages/vue/src/chart/chart-core/package.json b/packages/vue/src/chart/chart-core/package.json index fd6ec2a21..bf0891313 100644 --- a/packages/vue/src/chart/chart-core/package.json +++ b/packages/vue/src/chart/chart-core/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-chart-core", - "version": "3.17.0", + "version": "3.17.1", "description": "", "main": "lib/index.js", "module": "index.ts", diff --git a/packages/vue/src/chart/chart-core/src/chart-core.ts b/packages/vue/src/chart/chart-core/src/chart-core.ts index ad3a398de..18471179c 100644 --- a/packages/vue/src/chart/chart-core/src/chart-core.ts +++ b/packages/vue/src/chart/chart-core/src/chart-core.ts @@ -5,6 +5,7 @@ import { DEFAULT_COLORS, SAAS_DEFAULT_COLORS, SAAS_DEFAULT_SAME_COLORS, DEFAULT_ import IntegrateChart from '../base' import BaiduMapChart from '../base/components/BaiduMapChart' import AutonaviMapChart from '../base/components/AutonaviMapChart' +import cloneDeep from '../base/util/cloneDeep' import '@opentiny/vue-theme/chart-core/index.less' export default {