(data: &impl Plot)
| 14 | } |
| 15 | |
| 16 | pub(crate) fn build_plotly_result(data: &impl Plot) -> PlotlyResult { |
| 17 | let (layout, layout_overrides) = crate::converters::layout::convert_layout_ir(data.ir_layout()); |
| 18 | let traces: Vec<Box<dyn Trace + 'static>> = data |
| 19 | .ir_traces() |
| 20 | .iter() |
| 21 | .map(crate::converters::trace::convert) |
| 22 | .collect(); |
| 23 | let mut plot = Plotly::new(); |
| 24 | plot.set_layout(layout); |
| 25 | plot.add_traces(traces); |
| 26 | PlotlyResult { |
| 27 | plot, |
| 28 | layout_overrides, |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | /// Render plot JSON (possibly with overrides) to a standalone HTML document. |
| 33 | pub(crate) fn render_html_from_json(plot_json: &str) -> String { |
no test coverage detected