Undoes the merge of #1334
This commit is contained in:
etimberg
2016-03-29 19:41:13 -04:00
parent d7117bc792
commit 3f73433831
3 changed files with 17 additions and 11 deletions

22
Chart.js vendored
View File

@@ -977,7 +977,7 @@
return this;
},
generateLegend : function(){
return helpers.template(this.options.legendTemplate, {datasets: this.datasets});
return helpers.template(this.options.legendTemplate, this);
},
destroy : function(){
this.stop();
@@ -2059,7 +2059,7 @@
for (var i = this.valuesCount - 1; i >= 0; i--) {
var centerOffset = null, outerPosition = null;
if (this.angleLineWidth > 0){
if (this.angleLineWidth > 0 && (i % this.angleLineInterval === 0)){
centerOffset = this.calculateCenterOffset(this.max);
outerPosition = this.getPointPosition(i, centerOffset);
ctx.beginPath();
@@ -2335,8 +2335,10 @@
bar.restore(['fillColor', 'strokeColor']);
});
helpers.each(activeBars, function(activeBar){
activeBar.fillColor = activeBar.highlightFill;
activeBar.strokeColor = activeBar.highlightStroke;
if (activeBar) {
activeBar.fillColor = activeBar.highlightFill;
activeBar.strokeColor = activeBar.highlightStroke;
}
});
this.showTooltip(activeBars);
});
@@ -2369,8 +2371,8 @@
datasetLabel: dataset.label,
strokeColor : (typeof dataset.strokeColor != 'string') ? dataset.strokeColor[index] : dataset.strokeColor,
fillColor : (typeof dataset.fillColor != 'string') ? dataset.fillColor[index] : dataset.fillColor,
highlightFill : (dataset.highlightFill && typeof dataset.highlightFill != 'string') ? dataset.highlightFill[index] || dataset.highlightFill : (typeof dataset.fillColor != 'string') ? dataset.fillColor[index] : dataset.fillColor,
highlightStroke : (dataset.highlightStroke && typeof dataset.highlightStroke != 'string') ? dataset.highlightStroke[index] || dataset.highlightStroke : (typeof dataset.strokeColor != 'string') ? dataset.strokeColor[index] : dataset.strokeColor
highlightFill : (dataset.highlightFill) ? (typeof dataset.highlightFill != 'string') ? dataset.highlightFill[index] : dataset.highlightFill : (typeof dataset.fillColor != 'string') ? dataset.fillColor[index] : dataset.fillColor,
highlightStroke : (dataset.highlightStroke) ? (typeof dataset.highlightStroke != 'string') ? dataset.highlightStroke[index] : dataset.highlightStroke : (typeof dataset.strokeColor != 'string') ? dataset.strokeColor[index] : dataset.strokeColor
}));
},this);
@@ -2595,7 +2597,7 @@
Chart.Type.extend({
//Passing in a name registers this chart in the Chart namespace
name: "Doughnut",
//Providing a defaults will also register the deafults in the chart namespace
//Providing a defaults will also register the defaults in the chart namespace
defaults : defaultConfig,
//Initialize is fired when the chart is initialized - Data is passed in as a parameter
//Config is automatically merged by the core of Chart.js, and is available at this.options
@@ -3189,7 +3191,7 @@
Chart.Type.extend({
//Passing in a name registers this chart in the Chart namespace
name: "PolarArea",
//Providing a defaults will also register the deafults in the chart namespace
//Providing a defaults will also register the defaults in the chart namespace
defaults : defaultConfig,
//Initialize is fired when the chart is initialized - Data is passed in as a parameter
//Config is automatically merged by the core of Chart.js, and is available at this.options
@@ -3414,6 +3416,9 @@
//Number - Pixel width of the angle line
angleLineWidth : 1,
//Number - Interval at which to draw angle lines ("every Nth point")
angleLineInterval: 1,
//String - Point label font declaration
pointLabelFontFamily : "'Arial'",
@@ -3567,6 +3572,7 @@
lineColor: this.options.scaleLineColor,
angleLineColor : this.options.angleLineColor,
angleLineWidth : (this.options.angleShowLineOut) ? this.options.angleLineWidth : 0,
angleLineInterval: (this.options.angleLineInterval) ? this.options.angleLineInterval : 1,
// Point labels at the edge of each line
pointLabelFontColor : this.options.pointLabelFontColor,
pointLabelFontSize : this.options.pointLabelFontSize,

4
Chart.min.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -977,7 +977,7 @@
return this;
},
generateLegend : function(){
return helpers.template(this.options.legendTemplate, {datasets: this.datasets});
return helpers.template(this.options.legendTemplate, this);
},
destroy : function(){
this.stop();