diff --git a/lib/timeline/Core.js b/lib/timeline/Core.js index 4000dd96..5d81ffe6 100644 --- a/lib/timeline/Core.js +++ b/lib/timeline/Core.js @@ -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); } diff --git a/lib/timeline/component/GraphGroup.js b/lib/timeline/component/GraphGroup.js index 284fae51..0e62747f 100644 --- a/lib/timeline/component/GraphGroup.js +++ b/lib/timeline/component/GraphGroup.js @@ -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');