Map#
Geo #
Geo(
data: DataType | StaticDataType,
*,
series: MapSeries | None = None,
region_column: str = "region",
color_axis: ColorAxis | None = None,
widget_id: str | None = None,
title: WidgetTitleType | None = None,
legend_position: LegendPosition = BOTTOM,
styling: MapStyling | None = None,
region: Region = WORLD,
tooltips: TooltipItems | None = None,
)
Widget for tailored geographic data visualization.
Allows the construction of a widget specifically tailored for geographical data visualization.
Constructor for Map Geo widget.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
DataType | StaticDataType
|
data source for the widget. |
required |
series
|
MapSeries | None
|
Series to be added to y axis. |
None
|
region_column
|
str
|
key to match region code in DS. |
'region'
|
widget_id
|
str | None
|
unique widget id in a dashboard. |
None
|
color_axis
|
ColorAxis | None
|
color axis spec. |
None
|
title
|
WidgetTitleType | None
|
title of widget can be either a string (fixed value) or determined by a value from another widget using a WidgetField. |
None
|
legend_position
|
LegendPosition
|
location of position relative to data, maps. |
BOTTOM
|
styling
|
MapStyling | None
|
styling for the map. |
None
|
region
|
Region
|
sets the region os the Map. |
WORLD
|
tooltips
|
TooltipItems | None
|
tooltip items to be displayed at Chart level. |
None
|
Examples:#
Create a minimal Map widget
Components#
NumericSeries #
NumericSeries(
*,
data_column: TemplatedStringItem = "value",
name: TemplatedStringItem | None = None,
formatting: NumberFormatting | None = None,
styling: Palette | SeriesStyling | None = None,
required: bool = True,
tooltips: TooltipItems | None = None,
)
Spec for a numeric series of a Map widget.
Constructor for NumericSeries.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_column
|
TemplatedStringItem
|
data column to match field in DataStore. |
'value'
|
name
|
TemplatedStringItem | None
|
series name (shown in legend and tooltip). |
None
|
formatting
|
NumberFormatting | None
|
formatting spec for value. |
None
|
styling
|
Palette | SeriesStyling | None
|
styling spec. |
None
|
required
|
bool
|
Flag to make the Series mandatory. If required == True and no Data the widget will show an error. If required==False and no Data, the widget hides the Series. |
True
|
tooltips
|
TooltipItems | None
|
tooltip items to be displayed at Series level. |
None
|
MapStyling #
Spec for MapStyling of a Map Geo widget.
Construct a Styling for a Map Geo widget.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
label
|
MapStylingLabel | None
|
label style for map |
None
|
ColorAxis #
ColorAxis(
*,
position: LegendPosition = BOTTOM,
formatting: NumberFormatting | None = None,
)
Spec for ColorAxis of a Map widget.
Construct a ColorAxis for a Map Shape widget.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
position
|
LegendPosition
|
location of position relative to data, maps. |
BOTTOM
|
formatting
|
NumberFormatting | None
|
formatting spec for value. |
None
|
Tooltips#
CategoryTooltipItem #
CategoryTooltipItem(
*,
data_column: TemplatedStringItem,
formatting: MapperFormatting,
label: str | DataField | None = None,
)
Customize tooltips for categorical data in Chart widget.
Define specifications for a category tooltip item within a Chart widget to customize the appearance and content of tooltips displayed for categorical data.
Constructor for CategoryTooltipItem.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_column
|
TemplatedStringItem
|
name of column in pandas dataframe(s) used for the value of the tooltip item. |
required |
formatting
|
MapperFormatting
|
tooltip formatting spec. |
required |
label
|
Optional[Union[str, DataField]]
|
label to be used for tooltip item, it can be either a string or a DataField object. |
None
|
CountryTooltipItem #
CountryTooltipItem(
*,
data_key: TemplatedStringItem,
country: str | DataField,
styling: CountryTooltipItemStyling | None = None,
formatting: TextFormatting | None = None,
)
Customize tooltips for numerical data in Chart.
Define specifications for a Country item within a tooltip for a Chart widget to customize the appearance and content of tooltips displayed for country data.
Constructor for NumberTooltipItem.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_key
|
TemplatedStringItem
|
name of key in pandas dataframe(s) used for the value of the tooltip item. |
required |
country
|
str | DataField
|
country code. |
required |
styling
|
CountryTooltipItemStyling | None
|
styling specs. |
None
|
formatting
|
TextFormatting | None
|
formatting specs. |
None
|
DatetimeTooltipItem #
DatetimeTooltipItem(
*,
data_column: TemplatedStringItem,
formatting: DateTimeFormatting | None = None,
label: str | DataField | None = None,
)
Customize tooltips for datetime data in Chart.
Define specifications for a datetime item within a tooltip for a Chart widget to customize the appearance and content of tooltips displayed for datetime data.
Constructor for DatetimeTooltipItem.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_column
|
TemplatedStringItem
|
name of column in pandas dataframe(s) used for the value of the tooltip item. |
required |
formatting
|
DateTimeFormatting
|
tooltip formatting spec Defaults to DateTimeFormatting for Dates (i.e. not include HH:MM). |
None
|
label
|
Optional[Union[str, DataField]]
|
label to be used for tooltip item, it can be either a string or a DataField object. |
None
|
NumberTooltipItem #
NumberTooltipItem(
*,
data_column: TemplatedStringItem,
formatting: NumberFormatting | None = None,
label: str | DataField | None = None,
)
Customize tooltips for numerical data in Chart.
Define specifications for a number item within a tooltip for a Chart widget to customize the appearance and content of tooltips displayed for numerical data.
Constructor for NumberTooltipItem.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_column
|
TemplatedStringItem
|
name of column in pandas dataframe(s) used for the value of the tooltip item. |
required |
formatting
|
NumberFormatting | None
|
tooltip formatting spec. Defaults to None (Base NumberFormatting). |
None
|
label
|
str | DataField | None
|
label to be used for tooltip item, it can be either a string or a DataField object. |
None
|
TextTooltipItem #
TextTooltipItem(
*,
data_column: TemplatedStringItem,
formatting: TextFormatting | None = None,
label: str | DataField | None = None,
)
Customize tooltips for textual data in Chart.
Define specifications for a text item within a tooltip for a Chart widget to customize the appearance and content of tooltips displayed for textual data.
Constructor for TextTooltipItem.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_column
|
TemplatedStringItem
|
name of column in pandas dataframe(s) used for the value of the tooltip item. |
required |
formatting
|
Optional[TextFormatting]
|
tooltip formatting spec. Defaults to TextFormatting(max_characters=30). |
None
|
label
|
Optional[Union[str, DataField]]
|
label to be used for tooltip item, it can be either a string or a DataField object. |
None
|
Enums#
LegendPosition #
Legend positioning options on map.
Options for positioning the legend on the map, including top, left, right, and bottom.
Attributes:
Name | Type | Description |
---|---|---|
TOP |
Legend is placed on the top of the map. |
|
LEFT |
Legend is placed on the left side of the map. |
|
RIGHT |
Legend is placed on the right side of the map. |
|
BOTTOM |
Legend is placed on the bottom of the map. |
Region #
Region options for map.
Options for defining the region of the map, such as world, Europe, USA, and North America.
Attributes:
Name | Type | Description |
---|---|---|
WORLD |
World region. |
|
EUROPE |
Europe region. |
|
USA |
USA region. |
|
NORTH_AMERICA |
North America region. |
|
SAUDI_ARABIA |
Saudi Arabia region. |