Chart.js line chart is cut off at the top?

前端 未结 7 1506
死守一世寂寞
死守一世寂寞 2020-12-16 19:27

For some reasone all graphs are cut off at the highest value. How can i fix this? I can\'t use a fixed y-axis

7条回答
  •  心在旅途
    2020-12-16 19:43

    I ran into this Chart.js bug, too.

    A very recent fix is shown here. You'd have to manually edit your Chart.js file src/controllers/controller.line.js (For Angular 2, this file path will be located inside directory node_modules/chart.js/.)

    Or just wait for the next Chart.js release which will most likely contain the fix.

    An alternative workaround is described in comment 1 of this bug ticket: https://github.com/chartjs/Chart.js/issues/4202

提交回复
热议问题