Closed VotusX closed 4 months ago
The axis are draw by the d3-axis
library, it has a setter to control the padding, you can do the following:
const options = {
target: '#playground',
grid: true,
width: window.innerWidth,
height: window.innerHeight,
data: [{ fn: 'x^2', graphType: 'polyline', color: 'orange' }]
}
// initial render
const instance = functionPlot(options)
// instance.meta.xAxis was created by the initial call, we can update the padding
instance.meta.xAxis.tickPadding(-5)
// redraw graph
functionPlot(options)
Hey there,
I encountered a problem where the tick labels of the x-axis are cut off when I change their font size. I have tried various ways but I wasn't able to resolve it. Below I attached a screenshot and my code.
Any help would be greatly appreaciated! Best regards