diff --git a/packages/vstory/src/story/character/chart/graphic/vchart-graphic-picker.ts b/packages/vstory/src/story/character/chart/graphic/vchart-graphic-picker.ts index 49461f76..9167ee00 100644 --- a/packages/vstory/src/story/character/chart/graphic/vchart-graphic-picker.ts +++ b/packages/vstory/src/story/character/chart/graphic/vchart-graphic-picker.ts @@ -24,6 +24,7 @@ export class VChartPicker implements IGraphicPicker { const toChartMatrix = vchartStage.window.getViewBoxTransform(); toChartMatrix.transformPoint(nextP, nextP); const pick = vchartStage.pick(nextP.x, nextP.y); + // @ts-ignore if (pick.graphic === null && pick.group.name === 'root') { return false; } diff --git a/packages/vstory/src/story/character/chart/graphic/vchart-graphic.ts b/packages/vstory/src/story/character/chart/graphic/vchart-graphic.ts index 30431307..2e214fc2 100644 --- a/packages/vstory/src/story/character/chart/graphic/vchart-graphic.ts +++ b/packages/vstory/src/story/character/chart/graphic/vchart-graphic.ts @@ -26,6 +26,8 @@ export interface IChartGraphicAttribute extends IGraphicAttribute { autoRender?: boolean; chartInitOptions?: any; enablePickBounds?: boolean; + width: number; + height: number; } export const CHART_NUMBER_TYPE = genNumberType(); @@ -216,6 +218,7 @@ export class Chart extends Graphic implements IVisactorGraphic { this.setAttributes({ x: viewBox.x1 + rootBounds.x1, y: viewBox.y1 + rootBounds.y1, + // @ts-ignore width: rootBounds.x2 - rootBounds.x1, height: rootBounds.y2 - rootBounds.y1 });