@@ -67,6 +67,8 @@ define([
6767 _mxObj : null ,
6868 _handle : null ,
6969
70+ _chartType : null ,
71+
7072 _resizeTimer : null ,
7173
7274 _currentContext : null ,
@@ -319,9 +321,7 @@ define([
319321
320322 _onClickChart : function ( evt ) {
321323 logger . debug ( this . id + "._onClickChart" ) ;
322-
323324 var elements = this . _chart . getElementAtEvent ( evt ) ;
324-
325325 if ( elements . length ) {
326326 var el = elements [ 0 ] ,
327327 datasetIndex = el . _datasetIndex ,
@@ -331,6 +331,11 @@ define([
331331 dataPointObject = dataset && dataset . points ? dataset . points [ pointIndex ] : null ;
332332
333333 if ( this . onclickDataSetMf && datasetObject ) {
334+ if ( this . _chartType === "pie" || this . _chartType === "doughnut" || this . _chartType === "polarArea" ) {
335+ // These chartTypes use a single series data set, so the datasetobject is different
336+ datasetObject = this . _activeDatasets [ pointIndex ] . obj ;
337+ }
338+
334339 this . _executeMicroflow ( this . onclickDataSetMf , null , datasetObject ) ;
335340 }
336341
@@ -431,7 +436,7 @@ define([
431436 } ,
432437
433438 _createDataSets : function ( data ) {
434- logger . debug ( this . id + "._createDataSets" , data ) ;
439+ logger . debug ( this . id + "._createDataSets" ) ;
435440 var _chartData = {
436441 labels : [ ] ,
437442 datasets : [
@@ -516,7 +521,7 @@ define([
516521 } ,
517522
518523 _hexToRgb : function ( hex , alpha ) {
519- logger . debug ( this . id + "._hexToRgb" , hex , alpha ) ;
524+ // logger.debug(this.id + "._hexToRgb", hex, alpha);
520525 if ( hex !== null ) {
521526 var regex = null ,
522527 shorthandRegex = null ,
0 commit comments