fixes plotly whitespace (#2548)

* fix plotly whitespace

* changelod
This commit is contained in:
Dawood Khan 2022-10-27 16:12:21 -04:00 committed by GitHub
parent cf7d44591f
commit 28b7d7de8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -4,7 +4,9 @@
No changes to highlight.
## Bug Fixes:
* Fix whitespace issue when using plotly. [@dawoodkhan82](https://github.com/dawoodkhan82) in [PR 2548](https://github.com/gradio-app/gradio/pull/2548)
* Apply appropriate alt text to all gallery images. [@camenduru](https://github.com/camenduru) in [PR 2358](https://github.com/gradio-app/gradio/pull/2538)
## Documentation Changes:
No changes to highlight.
@ -15,7 +17,8 @@ No changes to highlight.
No changes to highlight.
## Full Changelog:
No changes to highlight.
* Fix whitespace issue when using plotly. [@dawoodkhan82](https://github.com/dawoodkhan82) in [PR 2548](https://github.com/gradio-app/gradio/pull/2548)
* Apply appropriate alt text to all gallery images. [@camenduru](https://github.com/camenduru) in [PR 2358](https://github.com/gradio-app/gradio/pull/2538)
## Contributors Shoutout:
No changes to highlight.

View File

@ -88,6 +88,7 @@
if (value && value["type"] == "plotly") {
load_plotly_css();
let plotObj = JSON.parse(value["plot"]);
plotObj.layout.title ? plotObj.layout.margin = {autoexpand: true} : plotObj.layout.margin = {l: 0, r: 0, b: 0, t: 0};
Plotly.react(plotDiv, plotObj);
} else if (value && value["type"] == "bokeh") {
document.getElementById("bokehDiv").innerHTML = "";