diff --git a/samples/pie.html b/samples/pie.html new file mode 100644 index 000000000..91475d5d2 --- /dev/null +++ b/samples/pie.html @@ -0,0 +1,117 @@ + + + + + Pie Chart + + + + + + +
+ +
+ + + + + + + diff --git a/samples/polar-area.html b/samples/polar-area.html new file mode 100644 index 000000000..9c5af90d1 --- /dev/null +++ b/samples/polar-area.html @@ -0,0 +1,137 @@ + + + + + Polar Area Chart + + + + + + + +
+ +
+ + + + + + + diff --git a/samples/radar.html b/samples/radar.html new file mode 100644 index 000000000..b144e8b46 --- /dev/null +++ b/samples/radar.html @@ -0,0 +1,166 @@ + + + + + Radar Chart + + + + + + + +
+ +
+ + + + + + + + + diff --git a/src/annotation.js b/src/annotation.js index 8bad47459..287469446 100644 --- a/src/annotation.js +++ b/src/annotation.js @@ -22,7 +22,8 @@ module.exports = function(Chart) { elements: {}, options: helpers.initConfig(chartOptions.annotation || {}), onDestroy: [], - firstRun: true + firstRun: true, + supported: false }; ns[ns.options.drawTime] = function(easingDecimal) { @@ -34,6 +35,7 @@ module.exports = function(Chart) { // Add the annotation scale adjuster to each scale's afterDataLimits hook chartInstance.ensureScalesHaveIDs(); if (chartOptions.scales) { + ns.supported = true; chartHelpers.each(chartOptions.scales.xAxes, setAfterDataLimitsHook); chartHelpers.each(chartOptions.scales.yAxes, setAfterDataLimitsHook); } @@ -41,6 +43,10 @@ module.exports = function(Chart) { beforeUpdate: function(chartInstance) { var ns = chartInstance.annotation; + if (!ns.supported) { + return; + } + if (!ns.firstRun) { ns.options = helpers.initConfig(chartInstance.options.annotation || {}); } else {