From 9800e61c3e45d519d1e5a5b894c188e630c4af84 Mon Sep 17 00:00:00 2001 From: devonallison Date: Mon, 19 Sep 2022 16:08:15 -0600 Subject: [PATCH] README.md- add example for saving to HTML file --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 754a22a..a713f17 100644 --- a/README.md +++ b/README.md @@ -149,6 +149,21 @@ email.email( report.report("Simple report", "Simple text")) .withLockType(email.noLock()) ``` +## HTML + +### Save to file + +```groovy +import static io.deephaven.plugins.report.Functions.* + +def date = currentDateNy() +def pnl_table = db.i("Devins", "PNL").where("Date=$date") +def pnl_plot = plot("PNL", pnl_table, "Timestamp", "PNL").show() +def pnl_report = report("Devin's PNL Report for $date", pnl_table.tail(1), figure(pnl_plot).withSize(800, 400)) +html = io.deephaven.plugins.html.Functions.nonStatic() + +html.save("/db/TempFiles/dbquery/db_query_server/report.html", pnl_report) +``` ## Slack