Auto scaling y-axis (options.scales)


I’ve posted a quickchart question on stackoverflow:

Just wondering if the behaviour described there is intentional. Is y-axis auto-scaling (as shown in version 1) not the default behaviour?

Thanks for quickchart!

If you’re curious to see how I’m using QuickChart, for this case I’m using PowerShell to render Net Liquidity in QuickChart:

Net Liquidity is a macroeconomic metric which combines the Federal Reserve balance sheet, reverse repo facility, and the Treasury General Account.

For more info regarding Net Liquidity:

And another version of the script which plots SPX as well as the SPX fair value based on Net Liquidity.

Hi @dharmatech,

QuickChart sets ticks.beginAtZero by default if the scales object is not set. This is an unfortunate inconsitency with the vanilla Chart.js v2 renderer, but it persists for backwards compatibility reasons.

You can bypass this by setting options.scales yourself, or by using Chart.js v3 which does not include any default behavior.

I’ll make a note to update the docs to state this more clearly.

1 Like