条形图低于零时,条形图无法正确显示(chart.js)

时间:2018-09-30 18:56:50

标签: chart.js

如何使用chart.js解决我在条形图中面临的问题?

条形图在chart.js中低于零时无法正确显示条形图

datasets: [
                    {
                        label: 'Data1',
                        borderColor: "#2874A6",
                        backgroundColor: "#2874A6",
                        pointBackgroundColor: 'transparent',
                        borderWidth: 1,
                        fill: false,
                        type: 'bar',
                       data: scheme_returns,

enter image description here

1 个答案:

答案 0 :(得分:0)

由于问题尚不清楚,我的建议是使用.title-icon { content: url(https://images.pexels.com/photos/673865/pexels-photo-673865.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260); height: 20px; width: 20px; } 。这将有助于图表具有ticksmin轴值。只需按max比例添加以下代码

yAxes
相关问题