MCPcopy Create free account
hub / github.com/alceal/plotlars / write_html

Method write_html

crates/plotlars-plotly/src/ext.rs:61–70  ·  view source on GitHub ↗
(&self, path: impl Into<String>)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 3

build_plotly_resultFunction · 0.85
ir_to_jsonFunction · 0.85
render_html_from_jsonFunction · 0.85

Tested by

no test coverage detected