hopsworks.core.chart_api #
ChartApi #
REST wrapper over /project/{id}/charts.
The backend returns charts as plain dicts with layout fields (width/height/x/y) that are NOT NULL; callers creating charts must supply them.
HTTP calls go through :mod:hopsworks_common.core.rest so this module does not reach into the SDK's private client surface (_send_request / _project_id).
Returned by
create_chart #
create_chart(
title: str,
url: str,
description: str = "",
width: int = 6,
height: int = 4,
x: int = 0,
y: int = 0,
job_name: str | None = None,
) -> dict[str, Any]
Create a chart.
| PARAMETER | DESCRIPTION |
|---|---|
title | Chart title. TYPE: |
url | URL to render (typically a Plotly HTML asset in HopsFS). TYPE: |
description | Free-form description. TYPE: |
width | Dashboard width in grid units. TYPE: |
height | Dashboard height in grid units. TYPE: |
x | Dashboard x position in grid units. TYPE: |
y | Dashboard y position in grid units. TYPE: |
job_name | Optional Hopsworks job to associate. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
dict[str, Any] | The created chart dict. |
delete_chart #
delete_chart(chart_id: int) -> None
Delete a chart by ID.
| PARAMETER | DESCRIPTION |
|---|---|
chart_id | Chart identifier. TYPE: |