Sparkline take full height?

Hey!

Really enjoying QuickChart so far. Just wondering if there is a way to make a sparkline chart use the full height?

For example for this chart, I want the Y axis to use all available height and remove the padding.

I tried using options.maintainAspectRatio: false with no luck.

Hi @Boxiom,

We’ve just pushed a change that improves the way available height is used for sparklines with large values. Your old chart is cached, but if you try it with a modified chart you should see an improvement.

If you’d like more control over the Y-axis range of the chart, you can customize the scale using the ticks.min and ticks.max scale options. You set ticks.min and ticks.max to the minimum and maximum values of your chart respectively:

{
  // ...
  options: {
    scales: {
      yAxes: [{
        display: false,
        ticks: {
          min: 38000,
          max: 42800
        },
      }]
    }
  }
}

Link to example config

Hope this helps!

1 Like

That’s perfect, thank you!