We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 206888b commit 9c2a0d9Copy full SHA for 9c2a0d9
test/jasmine/tests/plot_api_test.js
@@ -786,4 +786,29 @@ describe('Test plot api', function() {
786
expect(gd.data[1].contours).toBeUndefined();
787
});
788
789
+
790
+ describe('Plotly.newPlot', function() {
791
+ var gd;
792
793
+ beforeEach(function() {
794
+ gd = createGraphDiv();
795
+ });
796
797
+ afterEach(destroyGraphDiv);
798
799
+ it('should respect layout.width and layout.height', function(done) {
800
801
+ // See issue https://github.com/plotly/plotly.js/issues/537
802
+ var data = [{
803
+ x: [1, 2],
804
+ y: [1, 2]
805
+ }];
806
807
+ Plotly.plot(gd, data).then(function() {
808
+ Plotly.newPlot(gd, data, { height: 50 }).then(function() {
809
+ expect(gd._fullLayout.height).toBe(50);
810
+ }).then(done);
811
812
813
814
0 commit comments