mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-07 04:39:06 +02:00
Revert unnecessary changes
This commit is contained in:
parent
72c791f352
commit
5141c90c7b
@ -217,11 +217,7 @@ module.exports = function(Chart) {
|
||||
innerRadius = reset && animationOpts.animateScale ? 0 : this.innerRadius,
|
||||
outerRadius = reset && animationOpts.animateScale ? 0 : this.outerRadius,
|
||||
custom = arc.custom,
|
||||
valueAtIndexOrDefault = helpers.getValueAtIndexOrDefault,
|
||||
backgroundColor = "backgroundColor",
|
||||
hoverBackgroundColor = "hoverBackgroundColor",
|
||||
borderWidth = "borderWidth",
|
||||
borderColor = "borderColor";
|
||||
valueAtIndexOrDefault = helpers.getValueAtIndexOrDefault;
|
||||
|
||||
helpers.extend(arc, {
|
||||
// Utility
|
||||
@ -243,10 +239,10 @@ module.exports = function(Chart) {
|
||||
});
|
||||
|
||||
var model = arc._model;
|
||||
model[backgroundColor] = custom && custom[backgroundColor] ? custom[backgroundColor] : valueAtIndexOrDefault(dataset[backgroundColor], index, arcOpts[backgroundColor]);
|
||||
model[hoverBackgroundColor] = custom && custom[hoverBackgroundColor] ? custom[hoverBackgroundColor] : valueAtIndexOrDefault(dataset[hoverBackgroundColor], index, arcOpts[hoverBackgroundColor]);
|
||||
model[borderWidth] = custom && custom[borderWidth] ? custom[borderWidth] : valueAtIndexOrDefault(dataset[borderWidth], index, arcOpts[borderWidth]);
|
||||
model[borderColor] = custom && custom[borderColor] ? custom[borderColor] : valueAtIndexOrDefault(dataset[borderColor], index, arcOpts[borderColor]);
|
||||
model.backgroundColor = custom && custom.backgroundColor ? custom.backgroundColor : valueAtIndexOrDefault(dataset.backgroundColor, index, arcOpts.backgroundColor);
|
||||
model.hoverBackgroundColor = custom && custom.hoverBackgroundColor ? custom.hoverBackgroundColor : valueAtIndexOrDefault(dataset.hoverBackgroundColor, index, arcOpts.hoverBackgroundColor);
|
||||
model.borderWidth = custom && custom.borderWidth ? custom.borderWidth : valueAtIndexOrDefault(dataset.borderWidth, index, arcOpts.borderWidth);
|
||||
model.borderColor = custom && custom.borderColor ? custom.borderColor : valueAtIndexOrDefault(dataset.borderColor, index, arcOpts.borderColor);
|
||||
|
||||
// Set correct angles if not resetting
|
||||
if (!reset || !animationOpts.animateRotate) {
|
||||
|
@ -111,20 +111,18 @@ module.exports = function(Chart) {
|
||||
globalDefaults = Chart.defaults.global,
|
||||
display = opts.display,
|
||||
fontSize = valueOrDefault(opts.fontSize, globalDefaults.defaultFontSize),
|
||||
minSize = _this.minSize,
|
||||
width = "width",
|
||||
height = "height";
|
||||
minSize = _this.minSize;
|
||||
|
||||
if (_this.isHorizontal()) {
|
||||
minSize[width] = _this.maxWidth; // fill all the width
|
||||
minSize[height] = display ? fontSize + (opts.padding * 2) : 0;
|
||||
minSize.width = _this.maxWidth; // fill all the width
|
||||
minSize.height = display ? fontSize + (opts.padding * 2) : 0;
|
||||
} else {
|
||||
minSize[width] = display ? fontSize + (opts.padding * 2) : 0;
|
||||
minSize[height] = _this.maxHeight; // fill all the height
|
||||
minSize.width = display ? fontSize + (opts.padding * 2) : 0;
|
||||
minSize.height = _this.maxHeight; // fill all the height
|
||||
}
|
||||
|
||||
_this[width] = minSize[width];
|
||||
_this[height] = minSize[height];
|
||||
_this.width = minSize.width;
|
||||
_this.height = minSize.height;
|
||||
|
||||
},
|
||||
afterFit: noop,
|
||||
|
Loading…
Reference in New Issue
Block a user