(&self, path: impl Into<String>)
| 59 | } |
| 60 | |
| 61 | fn write_html(&self, path: impl Into<String>) { |
| 62 | let result = build_plotly_result(self); |
| 63 | if result.layout_overrides.is_some() { |
| 64 | let json = ir_to_json(self).unwrap_or_default(); |
| 65 | let html = render_html_from_json(&json); |
| 66 | std::fs::write(path.into(), html).expect("failed to write html output"); |
| 67 | } else { |
| 68 | result.plot.write_html(path.into()); |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | fn to_json(&self) -> Result<String, serde_json::Error> { |
| 73 | ir_to_json(self) |
nothing calls this directly
no test coverage detected