Skip to content

Instantly share code, notes, and snippets.

@goooseman
Last active November 27, 2020 09:33
Show Gist options
  • Save goooseman/587f0b417cd3ea0068fcf4f3a8a6d6c1 to your computer and use it in GitHub Desktop.
Save goooseman/587f0b417cd3ea0068fcf4f3a8a6d6c1 to your computer and use it in GitHub Desktop.
import libraryB, { Axis } from ‘library-b’;
const chart = new libraryB.Bar(document.body);
chart.on(‘axisDrawn’, (axis: Axis) => {
if (!axis.value % 10 !== 0) {
return;
}
axis.element.attr({
y1: data.y2,
y2: data.y2 + Y_LABEL_MARGIN - 5,
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment