mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 12:19:08 +02:00
Fix horizontalBar deprecation warnings (#6603)
Fix horizontalBar deprecation warnings
This commit is contained in:
parent
ea100d400e
commit
21da5be3c6
@ -18,8 +18,6 @@ defaults._set('horizontalBar', {
|
||||
yAxes: [{
|
||||
type: 'category',
|
||||
position: 'left',
|
||||
categoryPercentage: 0.8,
|
||||
barPercentage: 0.9,
|
||||
offset: true,
|
||||
gridLines: {
|
||||
offsetGridLines: true
|
||||
@ -39,6 +37,15 @@ defaults._set('horizontalBar', {
|
||||
}
|
||||
});
|
||||
|
||||
defaults._set('global', {
|
||||
datasets: {
|
||||
horizontalBar: {
|
||||
categoryPercentage: 0.8,
|
||||
barPercentage: 0.9
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = BarController.extend({
|
||||
/**
|
||||
* @private
|
||||
@ -54,4 +61,3 @@ module.exports = BarController.extend({
|
||||
return this.getMeta().yAxisID;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1593,8 +1593,9 @@ describe('Chart.controllers.bar', function() {
|
||||
var meta = chart.getDatasetMeta(0);
|
||||
var yScale = chart.scales[meta.yAxisID];
|
||||
|
||||
var categoryPercentage = yScale.options.categoryPercentage;
|
||||
var barPercentage = yScale.options.barPercentage;
|
||||
var config = meta.controller._config;
|
||||
var categoryPercentage = config.categoryPercentage;
|
||||
var barPercentage = config.barPercentage;
|
||||
var stacked = yScale.options.stacked;
|
||||
|
||||
var totalBarHeight = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user