jtblin / angular-chart.js

Reactive, responsive, beautiful charts for AngularJS using Chart.js: http://jtblin.github.io/angular-chart.js
Other
2.67k stars 761 forks source link

Multiple Lines add data #653

Closed harryjms closed 7 years ago

harryjms commented 7 years ago

Overview

When adding multiple charts to a single canvas, some values are being added together. For example I have a chart consisting of two bar charts and two line graphs on a single canvas (blame the finance department!).

The bar charts and first line (as declared in the data array) are displaying correctly. However, the final chart (the second line chart) is plotting the value as line1 + line2 = y value.

I know the data is being fed in correctly because the tooltip values are correct, it is only the y value being plotted incorrectly.

Step to reproduce

Here is a jsbin template for convenience.

harryjms commented 7 years ago

Setting yaxes.stack = false resolved this!