Chart.js: Line Chart not displaying normal

Created on 20 Mar 2019  ·  9Comments  ·  Source: chartjs/Chart.js

I'm trying to use Line type but it only works if I zoom in the screen to180%. It is not showing until I zoom the browser. Maybe you have an idea about this. Please see the screenshot below.

support

Most helpful comment

All 9 comments

@jonjie0317 do you have a jsfiddle that reproduces this? What browser are you using?

Hi @etimberg . It is the jsfiddle https://jsfiddle.net/90ukf2do/1/ . But it seems like not working I don't know why. My browser is firefox 65.0.2.

Your data labels are drawn outside chart area unless you zoom enough?
Working fiddle: https://jsfiddle.net/03wf259s/2/

Hi @kurkle . The data is actually not showing even outside the chart. Please see the update; I edited it.

Please check this JSFIDDLE for my exact data and label.

You can specify the maximum tick for y axis

scales: {
    yAxes: [{
        ticks: {
            max: 200000
        }
    }]
}

or add the top padding to create a space for data labels.

layout: {
    padding: {
        top: 20
    }
}

Hi @nagix . How can I add padding? which part? Can I have a fiddle for this?

@nagix wow 💯 You saved the day bro. I thought it doesn't exists. Thanks man :)

Was this page helpful?
0 / 5 - 0 ratings