Convert a figure to a JSON string representation Parameters ---------- validate: bool (default True) True if the figure should be validated before being converted to JSON, False otherwise. pretty: bool (default False) Tru
(self, *args, **kwargs)
| 3420 | return pio.show(self, *args, **kwargs) |
| 3421 | |
| 3422 | def to_json(self, *args, **kwargs): |
| 3423 | """ |
| 3424 | Convert a figure to a JSON string representation |
| 3425 | |
| 3426 | Parameters |
| 3427 | ---------- |
| 3428 | validate: bool (default True) |
| 3429 | True if the figure should be validated before being converted to |
| 3430 | JSON, False otherwise. |
| 3431 | |
| 3432 | pretty: bool (default False) |
| 3433 | True if JSON representation should be pretty-printed, False if |
| 3434 | representation should be as compact as possible. |
| 3435 | |
| 3436 | remove_uids: bool (default True) |
| 3437 | True if trace UIDs should be omitted from the JSON representation |
| 3438 | |
| 3439 | engine: str (default None) |
| 3440 | The JSON encoding engine to use. One of: |
| 3441 | - "json" for an encoder based on the built-in Python json module |
| 3442 | - "orjson" for a fast encoder the requires the orjson package |
| 3443 | If not specified, the default encoder is set to the current value of |
| 3444 | plotly.io.json.config.default_encoder. |
| 3445 | |
| 3446 | Returns |
| 3447 | ------- |
| 3448 | str |
| 3449 | Representation of figure as a JSON string |
| 3450 | """ |
| 3451 | import plotly.io as pio |
| 3452 | |
| 3453 | return pio.to_json(self, *args, **kwargs) |
| 3454 | |
| 3455 | def full_figure_for_development(self, warn=True, as_dict=False): |
| 3456 | """ |
no outgoing calls