File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -432,7 +432,10 @@ export class PlotlyGraph extends HTMLElement {
432432 meta,
433433 vars,
434434 } ;
435-
435+ if ( ! this . isBrowsing ) {
436+ // to ensure the y axis autoranges to the visible data
437+ removeOutOfRange ( data , this . getAutoFetchRangeWithValueMargins ( ) ) ;
438+ }
436439 if ( trace . filters ) {
437440 try {
438441 for ( const filter of trace . filters ) {
@@ -464,10 +467,7 @@ export class PlotlyGraph extends HTMLElement {
464467 }
465468 }
466469 if ( trace . internal ) return ;
467- if ( ! this . isBrowsing ) {
468- // to ensure the y axis autoranges to the visible data
469- removeOutOfRange ( data , this . getAutoFetchRangeWithValueMargins ( ) ) ;
470- }
470+
471471 if ( data . xs . length === 0 && data . ys . length === 0 ) {
472472 /*
473473 Traces with no data are removed from the legend by plotly.
You can’t perform that action at this time.
0 commit comments