@@ -46,8 +46,8 @@ export default class DataBrowser extends React.Component {
46
46
selectedCells : { list : new Set ( ) , rowStart : - 1 , rowEnd : - 1 , colStart : - 1 , colEnd : - 1 } ,
47
47
firstSelectedCell : null ,
48
48
selectedData : [ ] ,
49
- numericSelectedData : [ ] , // Dados apenas numéricos para operações Sum
50
- hasDateInSelection : false , // Flag para detectar se há datas na seleção
49
+ numericSelectedData : [ ] , // Numeric data only for Sum operations
50
+ hasDateInSelection : false , // Flag to detect if there are dates in selection
51
51
prevClassName : props . className ,
52
52
panelWidth : 300 ,
53
53
isResizing : false ,
@@ -588,7 +588,7 @@ export default class DataBrowser extends React.Component {
588
588
for ( let i = colStart ; i <= colEnd ; i ++ ) {
589
589
const name = this . state . order [ i ] . name ;
590
590
const columnType = this . props . columns [ name ] . type ;
591
- // Permitir Number, Date, String (que pode conter números) para visualização
591
+ // Allow Number, Date, String (which can contain numbers) for visualization
592
592
if ( columnType !== 'Number' && columnType !== 'Date' && columnType !== 'String' ) {
593
593
validColumns = false ;
594
594
break ;
@@ -597,7 +597,7 @@ export default class DataBrowser extends React.Component {
597
597
598
598
const newSelection = new Set ( ) ;
599
599
const selectedData = [ ] ;
600
- let hasDateColumns = false ; // Flag para detectar se há colunas de data
600
+ let hasDateColumns = false ; // Flag to detect if there are date columns
601
601
602
602
for ( let x = rowStart ; x <= rowEnd ; x ++ ) {
603
603
let rowData = null ;
@@ -609,30 +609,30 @@ export default class DataBrowser extends React.Component {
609
609
const value = rowData . attributes [ this . state . order [ y ] . name ] ;
610
610
const columnType = this . props . columns [ this . state . order [ y ] . name ] . type ;
611
611
612
- // Incluir diferentes tipos de dados para visualização
612
+ // Include different data types for visualization
613
613
if ( columnType === 'Number' && typeof value === 'number' && ! isNaN ( value ) ) {
614
614
selectedData . push ( value ) ;
615
615
} else if ( columnType === 'Date' && value instanceof Date ) {
616
616
selectedData . push ( value ) ;
617
- hasDateColumns = true ; // Marcar que há datas
617
+ hasDateColumns = true ; // Mark that there are dates
618
618
} else if ( columnType === 'Date' && typeof value === 'string' && ! isNaN ( Date . parse ( value ) ) ) {
619
619
selectedData . push ( new Date ( value ) ) ;
620
- hasDateColumns = true ; // Marcar que há datas
620
+ hasDateColumns = true ; // Mark that there are dates
621
621
} else if ( columnType === 'String' && typeof value === 'string' ) {
622
- // Para strings, incluir apenas se puderem ser interpretadas como números
622
+ // For strings, include only if they can be interpreted as numbers
623
623
const numValue = parseFloat ( value ) ;
624
624
if ( ! isNaN ( numValue ) ) {
625
625
selectedData . push ( numValue ) ;
626
626
} else {
627
- selectedData . push ( value ) ; // Incluir strings para labels em time series
627
+ selectedData . push ( value ) ; // Include strings for labels in time series
628
628
}
629
629
}
630
630
}
631
631
newSelection . add ( `${ x } -${ y } ` ) ;
632
632
}
633
633
}
634
634
635
- // Criar array apenas com números para operações de soma (excluindo datas )
635
+ // Create array with only numbers for sum operations (excluding dates )
636
636
const numericData = selectedData . filter ( value =>
637
637
typeof value === 'number' && ! isNaN ( value )
638
638
) ;
@@ -650,8 +650,8 @@ export default class DataBrowser extends React.Component {
650
650
} ,
651
651
selectedObjectId : undefined ,
652
652
selectedData,
653
- numericSelectedData : numericData , // Dados apenas numéricos para Sum
654
- hasDateInSelection : hasDateColumns , // Flag para saber se há datas
653
+ numericSelectedData : numericData , // Numeric data only for Sum
654
+ hasDateInSelection : hasDateColumns , // Flag to know if there are dates
655
655
} ) ;
656
656
} else {
657
657
this . setCurrent ( { row, col } ) ;
@@ -660,8 +660,8 @@ export default class DataBrowser extends React.Component {
660
660
this . setState ( {
661
661
selectedCells : { list : new Set ( ) , rowStart : - 1 , rowEnd : - 1 , colStart : - 1 , colEnd : - 1 } ,
662
662
selectedData : [ ] ,
663
- numericSelectedData : [ ] , // Limpar dados numéricos
664
- hasDateInSelection : false , // Limpar flag de datas
663
+ numericSelectedData : [ ] , // Clear numeric data
664
+ hasDateInSelection : false , // Clear dates flag
665
665
current : { row, col } ,
666
666
firstSelectedCell : clickedCellKey ,
667
667
} ) ;
0 commit comments