File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
packages/javascript/jupyterlab-plotly Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -849,6 +849,9 @@ export class FigureView extends DOMWidgetView {
849849 // the model is not directly mutated by the Plotly.js library.
850850 var initialTraces = _ . cloneDeep ( this . model . get ( "_data" ) ) ;
851851 var initialLayout = _ . cloneDeep ( this . model . get ( "_layout" ) ) ;
852+ if ( ! initialLayout . height ) {
853+ initialLayout . height = 360 ;
854+ }
852855 var config = this . model . get ( "_config" ) ;
853856 config . editSelection = false ;
854857
Original file line number Diff line number Diff line change @@ -126,12 +126,16 @@ export class RenderedPlotly extends Widget implements IRenderMime.IRenderer {
126126 | any
127127 | IPlotlySpec ;
128128
129+ if ( ! layout . height ) {
130+ layout . height = 360 ;
131+ }
132+
129133 // Load plotly asynchronously
130134 const loadPlotly = async ( ) : Promise < void > => {
131135 if ( RenderedPlotly . Plotly === null ) {
132136 RenderedPlotly . Plotly = await import ( "plotly.js/dist/plotly" ) ;
133137 RenderedPlotly . _resolveLoadingPlotly ( ) ;
134- }
138+ }
135139 return RenderedPlotly . loadingPlotly ;
136140 } ;
137141
Original file line number Diff line number Diff line change 2121 overflow : hidden;
2222}
2323
24- /* Output styles */
25- .jp-OutputArea .jp-RenderedPlotly {
26- min-height : 360px ;
27- }
28-
2924/* Document icon */
3025.jp-PlotlyIcon {
3126 background-image : var (--jp-icon-plotly );
32- }
27+ }
You can’t perform that action at this time.
0 commit comments