@@ -858,7 +858,7 @@ export class TimeSeriesChart {
858858 const minLabelWidth = 1 ; // Minimum time difference to create a meaningful label
859859
860860 if ( labelWidth < minLabelWidth ) {
861- console . log ( ' Label too narrow, minimum width required:' , minLabelWidth ) ;
861+ // Label too narrow, minimum width required
862862 return ; // Don't create the label
863863 }
864864
@@ -884,8 +884,8 @@ export class TimeSeriesChart {
884884 if ( this . lastConfig ) {
885885 this . updateDisplay ( this . lastConfig ) ;
886886 }
887- } catch ( error ) {
888- console . error ( ' Failed to create label:' , error ) ;
887+ } catch ( _error ) {
888+ // Failed to create label - silent handling
889889 }
890890 }
891891
@@ -952,7 +952,7 @@ export class TimeSeriesChart {
952952
953953 return {
954954 silent : true , // Don't intercept mouse events - allow drawing over labels
955- data : markAreaData as unknown , // ECharts markArea type is complex, using unknown for data compatibility
955+ data : markAreaData as never , // ECharts markArea expects complex nested array structure
956956 } ;
957957 }
958958
@@ -1029,15 +1029,7 @@ export class TimeSeriesChart {
10291029 }
10301030
10311031 const data = source . getData ( config . xColumn , config . yColumn ) ;
1032- console . log ( 'Retrieved data for columns:' , {
1033- xColumn : config . xColumn ,
1034- yColumn : config . yColumn ,
1035- dataLength : data . length ,
1036- firstFewPoints : data . slice ( 0 , 3 ) ,
1037- lastFewPoints : data . slice ( - 3 ) ,
1038- sourceName : source . name ,
1039- sourceColumns : source . columns ,
1040- } ) ;
1032+ // Retrieved data for columns - debug info available if needed
10411033
10421034 // Apply configuration with defaults
10431035 const xType = config . xType || 'category' ;
@@ -1062,25 +1054,7 @@ export class TimeSeriesChart {
10621054 seriesData = data ;
10631055 }
10641056
1065- // Validate data for any invalid values
1066- const invalidPoints = seriesData . filter ( ( point ) => {
1067- const [ x , y ] = point ;
1068- const xNum = typeof x === 'string' ? parseFloat ( x ) : x ;
1069- return ! Number . isFinite ( xNum ) || ! Number . isFinite ( y ) ;
1070- } ) ;
1071-
1072- // eslint-disable-next-line no-console
1073- console . log ( 'Final series data for chart:' , {
1074- xType,
1075- xColumn : config . xColumn ,
1076- processingType :
1077- xType === 'category' && config . xColumn === 'index' ? 'row indices' : 'actual data' ,
1078- totalPoints : seriesData . length ,
1079- invalidPoints : invalidPoints . length ,
1080- invalidSample : invalidPoints . slice ( 0 , 3 ) ,
1081- firstFewSeriesPoints : seriesData . slice ( 0 , 3 ) ,
1082- lastFewSeriesPoints : seriesData . slice ( - 3 ) ,
1083- } ) ;
1057+ // Debug: Final series data for chart - xType, processing type, points validation
10841058
10851059 // Configure axes with proper auto-scaling
10861060 const xAxis : EChartOption . XAxis = {
@@ -1148,15 +1122,7 @@ export class TimeSeriesChart {
11481122 axisPointer : { type : 'cross' as const , snap } ,
11491123 } ;
11501124
1151- // eslint-disable-next-line no-console
1152- console . log ( 'Chart configuration debug:' , {
1153- showArea,
1154- xType,
1155- yType,
1156- seriesDataLength : seriesData . length ,
1157- firstPoint : seriesData [ 0 ] ,
1158- lastPoint : seriesData [ seriesData . length - 1 ] ,
1159- } ) ;
1125+ // Debug: Chart configuration - area display, axis types, data points
11601126
11611127 this . chart . setOption (
11621128 {
@@ -1349,12 +1315,7 @@ function getCurrentChartConfig(xColumn: string, yColumn: string): TimeSeriesConf
13491315 // Helper to get xType value - default to numeric for all columns
13501316 const xTypeValue = elXType ? ( elXType as { value ?: string } ) . value : undefined ;
13511317
1352- // eslint-disable-next-line no-console
1353- console . log ( 'X-axis type detection:' , {
1354- xColumn,
1355- xTypeDropdownValue : xTypeValue ,
1356- elXType : elXType ?. id ,
1357- } ) ;
1318+ // Debug: X-axis type detection logic
13581319
13591320 const xType : 'category' | 'time' | 'value' = ( ( ) => {
13601321 // Respect user's explicit choice
@@ -1376,8 +1337,7 @@ function getCurrentChartConfig(xColumn: string, yColumn: string): TimeSeriesConf
13761337 return 'value' ;
13771338 } ) ( ) ;
13781339
1379- // eslint-disable-next-line no-console
1380- console . log ( 'X-axis type result:' , xType ) ;
1340+ // Debug: X-axis type result
13811341
13821342 // Helper to get yType value
13831343 const yTypeValue = elYType ? ( elYType as { value ?: string } ) . value : undefined ;
@@ -1465,7 +1425,7 @@ function bindUIControls(chart: TimeSeriesChart): void {
14651425
14661426 if ( ! selectedLabelValue || selectedLabelValue === '' ) {
14671427 // No label selected, show error or create default
1468- console . warn ( ' No active label selected for drawing mode' ) ;
1428+ // No active label selected for drawing mode
14691429 // Revert button state
14701430 btnLabelMode . setAttribute ( 'aria-pressed' , 'false' ) ;
14711431 btnLabelMode . classList . remove ( 'active' ) ;
@@ -1496,14 +1456,7 @@ function bindUIControls(chart: TimeSeriesChart): void {
14961456 const xDropdown = document . querySelector ( '#x-axis' ) ;
14971457 const yDropdown = document . querySelector ( '#y-axis' ) ;
14981458
1499- // eslint-disable-next-line no-console
1500- console . log ( 'Dropdown element references:' , {
1501- xDropdown : xDropdown ?. id ,
1502- yDropdown : yDropdown ?. id ,
1503- sameElement : xDropdown === yDropdown ,
1504- xValue : ( xDropdown as { value ?: string } | null ) ?. value ,
1505- yValue : ( yDropdown as { value ?: string } | null ) ?. value ,
1506- } ) ;
1459+ // Debug: Dropdown element references and values
15071460
15081461 const updateChart = ( ) => {
15091462 // Don't update chart if we have no data sources at all
@@ -1525,17 +1478,13 @@ function bindUIControls(chart: TimeSeriesChart): void {
15251478 const xColumn = ( xDropdown as { value ?: string } | null ) ?. value || 'index' ;
15261479 const yColumn = ( yDropdown as { value ?: string } | null ) ?. value || 'value' ;
15271480
1528- console . log ( ' updateChart called with:' , { xColumn , yColumn } ) ;
1481+ // updateChart called with debug info available
15291482
15301483 // Only update if we have valid column values
15311484 if ( xColumn && yColumn && xColumn !== '' && yColumn !== '' ) {
15321485 // Get current configuration from all UI controls
15331486 const config = getCurrentChartConfig ( xColumn , yColumn ) ;
1534- console . log ( 'Generated config:' , {
1535- xColumn : config . xColumn ,
1536- yColumn : config . yColumn ,
1537- xType : config . xType ,
1538- } ) ;
1487+ // Generated config debug info available
15391488 chart . updateDisplay ( config ) ;
15401489 }
15411490 } ;
@@ -1550,11 +1499,11 @@ function bindUIControls(chart: TimeSeriesChart): void {
15501499 } ;
15511500
15521501 xDropdown ?. addEventListener ( 'change' , ( ) => {
1553- console . log ( ' X dropdown changed to:' , ( xDropdown as { value ?: string } | null ) ?. value ) ;
1502+ // X dropdown changed - debug info available
15541503 updateChart ( ) ;
15551504 } ) ;
15561505 yDropdown ?. addEventListener ( 'change' , ( ) => {
1557- console . log ( ' Y dropdown changed to:' , ( yDropdown as { value ?: string } | null ) ?. value ) ;
1506+ // Y dropdown changed - debug info available
15581507 updateChart ( ) ;
15591508 } ) ;
15601509
0 commit comments