File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ class PlotlyPanelCtrl extends MetricsPanelCtrl {
144144 series : SeriesWrapper [ ] ;
145145 seriesByKey : Map < string , SeriesWrapper > = new Map ( ) ;
146146 seriesHash = '?' ;
147+ seriesIsTimeseries = true ;
147148
148149 traces : any [ ] ; // The data sent directly to Plotly -- with a special __copy element
149150 layout : any ; // The layout used by Plotly
@@ -514,6 +515,11 @@ class PlotlyPanelCtrl extends MetricsPanelCtrl {
514515 return ;
515516 }
516517
518+ if ( ! this . seriesIsTimeseries ) {
519+ console . log ( 'Not timeseries data, time zoom disabled' ) ;
520+ return ;
521+ }
522+
517523 if ( data . points . length === 0 ) {
518524 console . log ( 'Nothing Selected' , data ) ;
519525 return ;
@@ -600,6 +606,7 @@ class PlotlyPanelCtrl extends MetricsPanelCtrl {
600606 }
601607
602608 const useRefID = dataList . length === this . panel . targets . length ;
609+ this . seriesIsTimeseries = true ;
603610 dataList . forEach ( ( series , sidx ) => {
604611 let refId = '' ;
605612 if ( autotrace ) {
@@ -624,6 +631,8 @@ class PlotlyPanelCtrl extends MetricsPanelCtrl {
624631 } else {
625632 console . error ( 'Unsupported Series response' , sidx , series ) ;
626633 }
634+ if ( series . type === 'table' )
635+ this . seriesIsTimeseries = false ;
627636 } ) ;
628637 }
629638 this . seriesByKey . clear ( ) ;
You can’t perform that action at this time.
0 commit comments