Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README.md- add example for saving to HTML file #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down