Browse Source

Merge pull request 'fit tick labels into bounding box' (#3) from fit-tick-labels-into-bounding-box into main

Reviewed-on: #3
remove-unused-methods
rozetko 1 year ago
parent
commit
ca54847fbb
  1. 2
      package.json
  2. 2
      src/index.ts

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "@chartwerk/core", "name": "@chartwerk/core",
"version": "0.6.15", "version": "0.6.16",
"description": "Chartwerk core", "description": "Chartwerk core",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",

2
src/index.ts

@ -219,6 +219,8 @@ abstract class ChartwerkPod<T extends Serie, O extends Options> {
this.renderXAxis(); this.renderXAxis();
this.renderYAxis(); this.renderYAxis();
this.renderY1Axis(); 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); this.options.callbackComponentRenderEnd(RenderComponent.AXES);
} }

Loading…
Cancel
Save