Chartjs-Combo bar chart graph line gets obscured by bars

0👍

I have realised it goes according to the order in which you define them. When you define the line graph first then it appears above the bar chart. You can see this in my updated jsFiddle

datasets: [{
                label: "Sales",
                    type:'line',
                    data: [51, 65, 40, 49, 60, 37, 40],
                    fill: false,
                    borderColor: '#EC932F',
                    backgroundColor: '#EC932F',
                    pointBorderColor: '#EC932F',
                    pointBackgroundColor: '#EC932F',
                    pointHoverBackgroundColor: '#EC932F',
                    pointHoverBorderColor: '#EC932F',
                    yAxisID: 'y-axis-2'
            }, {
                type: 'bar',
                  label: "Visitor",
                    data: [200, 185, 590, 621, 250, 400, 95],
                    fill: false,
                    backgroundColor: '#71B37C',
                    borderColor: '#71B37C',
                    hoverBackgroundColor: '#71B37C',
                    hoverBorderColor: '#71B37C',
                    yAxisID: 'y-axis-1'
            } ]

However, this doesn’t explain why the original Plunker example doesn’t have this issue

Leave a comment