Browse Source

Delegate the onRender function to the correct property

flowchartTest
Manuel Schallar 9 years ago
parent
commit
d51be3bbf5
2 changed files with 14 additions and 0 deletions
  1. +7
    -0
      lib/timeline/Core.js
  2. +7
    -0
      lib/timeline/component/GraphGroup.js

+ 7
- 0
lib/timeline/Core.js View File

@ -254,6 +254,13 @@ Core.prototype.setOptions = function (options) {
}
}
// if the graph2d's drawPoints is a function delegate the callback to the onRender property
if (typeof options.drawPoints == 'function') {
options.drawPoints = {
onRender: options.drawPoints
};
}
if ('hiddenDates' in this.options) {
DateUtil.convertHiddenOptions(this.body, this.options.hiddenDates);
}

+ 7
- 0
lib/timeline/component/GraphGroup.js View File

@ -69,6 +69,13 @@ GraphGroup.prototype.setOptions = function(options) {
var fields = ['sampling','style','sort','yAxisOrientation','barChart'];
util.selectiveDeepExtend(fields, this.options, options);
// if the group's drawPoints is a function delegate the callback to the onRender property
if (typeof options.drawPoints == 'function') {
options.drawPoints = {
onRender: options.drawPoints
}
}
util.mergeOptions(this.options, options,'interpolation');
util.mergeOptions(this.options, options,'drawPoints');
util.mergeOptions(this.options, options,'shaded');

Loading…
Cancel
Save