Browse Source

fit tick labels into bounding box

pull/3/head
rozetko 2 years ago
parent
commit
d074e2285b
  1. 2
      src/index.ts

2
src/index.ts

@ -219,6 +219,8 @@ abstract class ChartwerkPod<T extends Serie, O extends Options> {
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);
}

Loading…
Cancel
Save