File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -214,14 +214,23 @@ var __visualizer_chart_images = [];
214
214
for ( i = 0 ; i < data . length ; i ++ ) {
215
215
row = [ ] ;
216
216
for ( j = 0 ; j < series . length ; j ++ ) {
217
- if ( series [ j ] . type === 'date' || series [ j ] . type === 'datetime' ) {
218
- date = new Date ( data [ i ] [ j ] ) ;
219
- data [ i ] [ j ] = null ;
220
- if ( Object . prototype . toString . call ( date ) === "[object Date]" ) {
221
- if ( ! isNaN ( date . getTime ( ) ) ) {
222
- data [ i ] [ j ] = date ;
223
- }
224
- }
217
+ switch ( series [ j ] . type ) {
218
+ case 'string' :
219
+ if ( data [ i ] [ j ] === '' ) {
220
+ data [ i ] [ j ] = null ;
221
+ }
222
+ break ;
223
+ case 'date' :
224
+ // fall-through.
225
+ case 'datetime' :
226
+ date = new Date ( data [ i ] [ j ] ) ;
227
+ data [ i ] [ j ] = null ;
228
+ if ( Object . prototype . toString . call ( date ) === "[object Date]" ) {
229
+ if ( ! isNaN ( date . getTime ( ) ) ) {
230
+ data [ i ] [ j ] = date ;
231
+ }
232
+ }
233
+ break ;
225
234
}
226
235
row . push ( data [ i ] [ j ] ) ;
227
236
}
You can’t perform that action at this time.
0 commit comments