Closed henryjameslau closed 7 months ago
Hi Henry. I think we might need to code in some more control over how this operates. For this line chart example, with largely default settings (incl. y axis labels sitting on lines), removing the left + right padding from the length caused the axis lines to terminate before the right side of the chart.
How it is now
How it was with right + left padding subtracted
Ah I see. That looks like it's because the gridlines start from before where the lines start so needs a bit extra to make it to the end, whereas with the ordinal scales for categories that wouldn't make sense. Looks like we need something like a trimGridlinesBefore
and trimGridlinesAfter
Got it. Sounds like we could just make the left trimming conditional on the scale type, so no need to have any additional props. I'll try to figure out a fix for this today.
This should now be fixed in version 0.3.2.
I made trimGridlines take off paddingLeft so the gridlines would just be restricted to the graph https://github.com/ONSvisual/svelte-charts/commit/548d5c54138936590006c1c2bfe0916d8ff7fa15![image](https://github.com/ONSvisual/svelte-charts/assets/2945099/f9e24052-a173-448d-8207-5bf23d7750d7)
and then @bothness removed it https://github.com/ONSvisual/svelte-charts/commit/c9fcdc283fc6b782c4eff41c635737c73d02155f
So which is it?