diff --git a/packages/lark-vchart/src/index.js b/packages/lark-vchart/src/index.js index d5f9c8b14..82e17b8c7 100644 --- a/packages/lark-vchart/src/index.js +++ b/packages/lark-vchart/src/index.js @@ -99,7 +99,8 @@ Component({ }, // Get the dpr live as it will change at runtime due to dragging to different monitors dpr: tt.getSystemInfoSync().pixelRatio, - renderCanvas: `${this.data.canvasId}_draw_canvas` + renderCanvas: `${this.data.canvasId}_draw_canvas`, + ...this.data.options } ); this.chart = chartInstance; diff --git a/packages/taro-vchart/gallery/pages/chart/index.tsx b/packages/taro-vchart/gallery/pages/chart/index.tsx index 6a80db1cc..b674d37d7 100644 --- a/packages/taro-vchart/gallery/pages/chart/index.tsx +++ b/packages/taro-vchart/gallery/pages/chart/index.tsx @@ -51,6 +51,9 @@ export default function (props: any) { borderRadius: '4px', border: '1px solid #eeeeee' }} + options={{ + disableDirtyBounds: true + }} onChartInit={() => { console.log(`init ${type}`); }} diff --git a/packages/tt-vchart/src/index.js b/packages/tt-vchart/src/index.js index 3083c5e3a..3b53fa89d 100644 --- a/packages/tt-vchart/src/index.js +++ b/packages/tt-vchart/src/index.js @@ -95,7 +95,8 @@ Component({ }, // Get the dpr live as it will change at runtime due to dragging to different monitors dpr: tt.getSystemInfoSync().pixelRatio, - renderCanvas: `${this.data.canvasId}_draw_canvas` + renderCanvas: `${this.data.canvasId}_draw_canvas`, + ...this.data.options } ); this.chart = chartInstance; diff --git a/packages/wx-vchart/miniprogram/src/index.js b/packages/wx-vchart/miniprogram/src/index.js index b5d14b07d..eef455697 100644 --- a/packages/wx-vchart/miniprogram/src/index.js +++ b/packages/wx-vchart/miniprogram/src/index.js @@ -91,7 +91,8 @@ Component({ }, // Get the dpr live as it will change at runtime due to dragging to different monitors dpr: wx.getSystemInfoSync().pixelRatio, - renderCanvas: `${this.data.canvasId}_draw_canvas` + renderCanvas: `${this.data.canvasId}_draw_canvas`, + ...this.data.options } ); this.chart = chartInstance;