var barIndex = 0;
for (var j = 0; j < datasetIndex; ++j) {
- if (helpers.isDatasetVisible(this.chart.data.datasets[j]) &&
- (this.chart.data.datasets[j].type === 'bar' || (this.chart.data.datasets[j].type === undefined && this.chart.config.type === 'bar'))) {
+ if (helpers.isDatasetVisible(this.chart.data.datasets[j]) && this.chart.data.datasets[j].bar) {
++barIndex;
}
}
var chart = {
data: {
datasets: [{
- type: 'line'
}, {
- type: 'bar'
+ bar: true
}, {
- // no type, defaults to bar
+ bar: true
}]
},
config: {
var chart = {
data: {
datasets: [{
-
+ bar: true,
}, {
+ bar: true,
hidden: true
}, {
- type: 'line'
}, {
-
+ bar: true,
}]
},
config: {
data: [1, 2],
label: 'dataset1',
xAxisID: 'firstXScaleID',
- yAxisID: 'firstYScaleID'
+ yAxisID: 'firstYScaleID',
+ bar: true
}, {
data: [10, 15, 0, -4],
label: 'dataset2'