File tree 3 files changed +9
-7
lines changed
packages/javascript/jupyterlab-plotly
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 {
849
849
// the model is not directly mutated by the Plotly.js library.
850
850
var initialTraces = _ . cloneDeep ( this . model . get ( "_data" ) ) ;
851
851
var initialLayout = _ . cloneDeep ( this . model . get ( "_layout" ) ) ;
852
+ if ( ! initialLayout . height ) {
853
+ initialLayout . height = 360 ;
854
+ }
852
855
var config = this . model . get ( "_config" ) ;
853
856
config . editSelection = false ;
854
857
Original file line number Diff line number Diff line change @@ -126,12 +126,16 @@ export class RenderedPlotly extends Widget implements IRenderMime.IRenderer {
126
126
| any
127
127
| IPlotlySpec ;
128
128
129
+ if ( ! layout . height ) {
130
+ layout . height = 360 ;
131
+ }
132
+
129
133
// Load plotly asynchronously
130
134
const loadPlotly = async ( ) : Promise < void > => {
131
135
if ( RenderedPlotly . Plotly === null ) {
132
136
RenderedPlotly . Plotly = await import ( "plotly.js/dist/plotly" ) ;
133
137
RenderedPlotly . _resolveLoadingPlotly ( ) ;
134
- }
138
+ }
135
139
return RenderedPlotly . loadingPlotly ;
136
140
} ;
137
141
Original file line number Diff line number Diff line change 21
21
overflow : hidden;
22
22
}
23
23
24
- /* Output styles */
25
- .jp-OutputArea .jp-RenderedPlotly {
26
- min-height : 360px ;
27
- }
28
-
29
24
/* Document icon */
30
25
.jp-PlotlyIcon {
31
26
background-image : var (--jp-icon-plotly );
32
- }
27
+ }
You can’t perform that action at this time.
0 commit comments