diff --git a/package.json b/package.json index 5060168..88a5c53 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chartwerk/core", - "version": "0.6.15", + "version": "0.6.16", "description": "Chartwerk core", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/index.ts b/src/index.ts index ac4eb65..ed21f90 100644 --- a/src/index.ts +++ b/src/index.ts @@ -219,6 +219,8 @@ abstract class ChartwerkPod { this.renderXAxis(); this.renderYAxis(); this.renderY1Axis(); + const bbox = this.svg.node().getBBox(); + this.svg.attr('viewBox', `${bbox.x} ${bbox.y} ${bbox.width} ${bbox.height}`); this.options.callbackComponentRenderEnd(RenderComponent.AXES); }