HeatmapChart
Last updated
Last updated
HeatmapChart
widget in Supervisely is a widget used for displaying a heatmap chart. It allows users to visualize data in a way that highlights patterns and trends. Users can hover over each cell to see the data for that cell. The HeatmapChart widget is often used in data analysis and visualization tasks, such as exploring the distribution of object instances in a dataset. HeatmapChart
allows downloading data series from widget in svg
, png
, and csv
formats.
Determines HeatmapChart
title.
type: str
Determines whether the values ββin the HeatmapChart
cells are displayed.
type: bool
default value: true
Determines X
axe title.
type: str
default value: None
Determines the color distribution on HeatmapChart
.
type: Literal["table", "row"]
default value: row
Determines the displayed value in the HeatmapChart
cells.
type: str
default value: None
You can find this example in our Github repository:
ui-widgets-demos/charts and plots/002_heatmap_chart/src/main.py
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
HeatmapChart
widgetHeatmapChart
widgetPrepare a layout for app using Card
widget with the content
parameter and place widget that we've just created in the Container
widget.
Create an app object with layout parameter.
Parameters | Type | Description |
---|---|---|
Attributes and Methods | Description |
---|---|
title
str
HeatmapChart
title
data_labels
bool
Determines whether the values ββin the HeatmapChart
cells are displayed
xaxis_title
str
X
axe title
color_range
Literal["table", "row"]
Determines the color distribution on HeatmapChart
tooltip
str
Determines the displayed value in the HeatmapChart
cells
add_series_batch(series: dict)
Add batch of series to chart.
add_series(name: str, x: list, y: list, send_changes=True)
Add series of data in HeatmapChart
.
get_clicked_datapoint()
Return data clicked in HeatmapChart
.
get_clicked_value()
Return seriesIndex
nad dataPointIndex
for clicked cell.
set_colors(colors: list)
Set colors for series in chart.
set_title(title: str)
Set chart title.
@click
Decorator function is handled when chart cell is clicked.