Skip to content

Commit

Permalink
fix: fix attribute type error
Browse files Browse the repository at this point in the history
  • Loading branch information
xuefei1313 committed Sep 12, 2024
1 parent 525427e commit 0c00af6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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
});
Expand Down

0 comments on commit 0c00af6

Please sign in to comment.