提交 1ce029b6 编写于 作者: C Catouse
上级 5065b6cf
...@@ -271,17 +271,18 @@ ...@@ -271,17 +271,18 @@
addData: function(valuesArray, label) { addData: function(valuesArray, label) {
//Map the values array for each of the datasets //Map the values array for each of the datasets
helpers.each(valuesArray, function(value, datasetIndex) { helpers.each(valuesArray,function(value,datasetIndex){
//Add a new point for each piece of data, passing any required data to draw. //Add a new point for each piece of data, passing any required data to draw.
this.datasets[datasetIndex].points.push(new this.PointClass({ this.datasets[datasetIndex].points.push(new this.PointClass({
value: value, value : value,
label: label, label : label,
x: this.scale.calculateX(this.scale.valuesCount + 1), datasetLabel: this.datasets[datasetIndex].label,
x: this.scale.calculateX(this.scale.valuesCount+1),
y: this.scale.endPoint, y: this.scale.endPoint,
strokeColor: this.datasets[datasetIndex].pointStrokeColor, strokeColor : this.datasets[datasetIndex].pointStrokeColor,
fillColor: this.datasets[datasetIndex].pointColor fillColor : this.datasets[datasetIndex].pointColor
})); }));
}, this); },this);
this.scale.addXLabel(label); this.scale.addXLabel(label);
//Then re-render the chart. //Then re-render the chart.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册