Commit f03252fb838ea42a74dae32ca0bd66de01a6f890
Merge branch 'perf/charts' into 'main_dev'
perf(src/packages/components): 优化图表组件中的,横向柱状图和热力图这两个图表,x轴和y轴显示混乱,原因是之前加了取值范围 See merge request yunteng/thingskit-view!245
Showing
2 changed files
with
8 additions
and
2 deletions
@@ -51,7 +51,10 @@ use([DatasetComponent, CanvasRenderer, BarChart, GridComponent, TooltipComponent | @@ -51,7 +51,10 @@ use([DatasetComponent, CanvasRenderer, BarChart, GridComponent, TooltipComponent | ||
51 | const replaceMergeArr = ref<string[]>() | 51 | const replaceMergeArr = ref<string[]>() |
52 | 52 | ||
53 | const option = computed(() => { | 53 | const option = computed(() => { |
54 | - return mergeTheme(props.chartConfig.option, props.themeSetting, includes) | 54 | + const mergeThemeData = mergeTheme(props.chartConfig.option, props.themeSetting, includes) |
55 | + Reflect.deleteProperty(mergeThemeData.yAxis, 'min') | ||
56 | + Reflect.deleteProperty(mergeThemeData.yAxis, 'max') | ||
57 | + return mergeThemeData | ||
55 | }) | 58 | }) |
56 | 59 | ||
57 | // dataset 无法变更条数的补丁 | 60 | // dataset 无法变更条数的补丁 |
@@ -52,7 +52,10 @@ use([ | @@ -52,7 +52,10 @@ use([ | ||
52 | ]) | 52 | ]) |
53 | 53 | ||
54 | const option = computed(() => { | 54 | const option = computed(() => { |
55 | - return mergeTheme(props.chartConfig.option, props.themeSetting, includes) | 55 | + const mergeThemeData = mergeTheme(props.chartConfig.option, props.themeSetting, includes) |
56 | + Reflect.deleteProperty(mergeThemeData.yAxis, 'min') | ||
57 | + Reflect.deleteProperty(mergeThemeData.yAxis, 'max') | ||
58 | + return mergeThemeData | ||
56 | }) | 59 | }) |
57 | 60 | ||
58 | const vChartRef = ref<typeof VChart>() | 61 | const vChartRef = ref<typeof VChart>() |