File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " ChartJS" ,
3- "version" : " 3.1.2 " ,
3+ "version" : " 3.1.3 " ,
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 @@ -418,14 +418,22 @@ define([
418418 } ) ) ;
419419 } ,
420420
421+ _isNumber : function ( n , attr ) {
422+ // Fix for older MX versions who do not have the .isNumeric method
423+ if ( typeof n . isNumeric === "function" ) {
424+ return n . isNumeric ( attr ) ;
425+ }
426+ return n . isNumber ( attr ) ;
427+ } ,
428+
421429 _sortArrayMx : function ( values , sortAttr ) {
422430 logger . debug ( this . id + "._sortArrayMx" ) ;
423431 return values . sort ( lang . hitch ( this , function ( a , b ) {
424432 var aa = + ( a . get ( sortAttr ) ) ,
425433 bb = + ( b . get ( sortAttr ) ) ;
426434 //if the attribute is numeric
427- aa = a . isNumeric ( sortAttr ) ? parseFloat ( aa ) : aa ;
428- bb = b . isNumeric ( sortAttr ) ? parseFloat ( bb ) : bb ;
435+ aa = this . _isNumber ( a , sortAttr ) ? parseFloat ( aa ) : aa ;
436+ bb = this . _isNumber ( b , sortAttr ) ? parseFloat ( bb ) : bb ;
429437 if ( aa > bb ) {
430438 return 1 ;
431439 }
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.1.2 " xmlns =" http://www.mendix.com/clientModule/1.0/" >
3+ <clientModule name =" ChartJS" version =" 3.1.3 " 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