Skip to content

Commit c0d525a

Browse files
committed
fix: fix the bug of no title
1 parent d064375 commit c0d525a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/vchart-extension/src/charts/combination-candlestick/combination-candlestick-transformer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export class CombinationCandlestickChartSpecTransformer<
137137
let totalCol = 0;
138138
// 先获取总计的行和列
139139
// 如果有 title
140-
if (spec.title?.visible !== false) {
140+
if (spec.title && spec.title?.visible !== false) {
141141
totalRow++;
142142
}
143143
// 图例
@@ -201,7 +201,7 @@ export class CombinationCandlestickChartSpecTransformer<
201201
right: 0
202202
};
203203
// 开始布局
204-
if (spec.title?.visible !== false) {
204+
if (spec.title && spec.title?.visible !== false) {
205205
this._layoutOrientItem(layout, spec.title, temp, { specKey: 'title', index: 0 }, 'total');
206206
}
207207
// 图例

0 commit comments

Comments
 (0)