File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " ChartJS" ,
3- "version" : " 3.6.0 " ,
3+ "version" : " 3.6.1 " ,
44 "description" : " This widget is a wrapper for the ChartJS library and you can use it to visualize your aggregated data." ,
55 "license" : " Apache License, Version 2" ,
66 "author" : " Mendix" ,
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ define([
7575 _addedToBody : false ,
7676
7777 _tooltipNode : null ,
78+ _destroyed : false ,
7879
7980 startup : function ( ) {
8081 logger . debug ( this . id + ".startup" ) ;
@@ -132,7 +133,7 @@ define([
132133 this . _data . datasets . push ( set ) ;
133134
134135 this . _datasetCounter -- ;
135- if ( this . _datasetCounter === 0 ) {
136+ if ( this . _datasetCounter === 0 && ! this . _destroyed ) {
136137 this . _processData ( ) ;
137138 }
138139 } ,
@@ -258,6 +259,8 @@ define([
258259 uninitialize : function ( ) {
259260 logger . debug ( this . id + ".uninitialize" ) ;
260261
262+ this . _destroyed = true ;
263+
261264 //console.log(this._data);
262265 if ( this . _handle !== null ) {
263266 this . unsubscribe ( this . _handle ) ;
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ define([
104104 this . _resize ( ) ;
105105 } ) ) ;
106106
107- if ( this . numberInside ) {
107+ if ( this . numberInside && this . _numberNode ) {
108108 var content = this . _data . object . get ( this . numberInside ) ;
109109 html . set ( this . _numberNode , content !== null ? content . toString ( ) : "" ) ;
110110 }
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ define([
106106 } ;
107107 this . _chart = new this . _chartJS ( this . _ctx , chartProperties ) ;
108108
109- if ( this . numberInside ) {
109+ if ( this . numberInside && this . _numberNode ) {
110110 var content = this . _data . object . get ( this . numberInside ) ;
111111 html . set ( this . _numberNode , content !== null ? content . toString ( ) : "" ) ;
112112 }
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<package xmlns =" http://www.mendix.com/package/1.0/" >
3- <clientModule name =" ChartJS" version =" 3.6.0 " xmlns =" http://www.mendix.com/clientModule/1.0/" >
3+ <clientModule name =" ChartJS" version =" 3.6.1 " xmlns =" http://www.mendix.com/clientModule/1.0/" >
44 <widgetFiles >
55 <widgetFile path =" ChartJS/widgets/BarChart/BarChart.xml" />
66 <widgetFile path =" ChartJS/widgets/LineChart/LineChart.xml" />
You can’t perform that action at this time.
0 commit comments