Tile#
Tile #
Tile(
data: Union[DataType, Dict[str, Any]],
*,
items: Optional[
List[Union[TileContentItem, str]]
] = None,
widget_id: Optional[str] = None,
header: Optional[Header] = None,
show_separator: bool = True,
orientation: Orientation = Orientation.HORIZONTAL,
height: Optional[Union[int, float]] = None
)
Spec for Tile Widget.
Construct spec for the Tile Widget.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
items |
Optional[List[Union[TileContentItem, str]]]
|
list of items to be displayed in the tile widget. |
None
|
widget_id |
Optional[str]
|
unique widget id in a dashboard. |
None
|
data |
Union[DataType, Dict[str, Any]]
|
data to be used by widget. Accepts Storages as well as raw data. |
required |
header |
Optional[Header]
|
spec for the header in Tile widget. |
None
|
show_separator |
bool
|
flag to show or hide separator. |
True
|
orientation |
Orientation
|
orientation of items in tile widget content. |
HORIZONTAL
|
height |
Optional[Union[int, float]]
|
height value for the widget. Defaults to 0.84 (84px). |
None
|
Note
If data
is a Http or a Http connector dependency,
make sure that the return from the http request is a dictionary.
Examples:#
Create a minimal Tile Widget
Create a Tile widget with items as strings
Create a Tile widget with custom items
Create a Tile widget without separator
Create a Tile widget with vertical orientation
Tile Header#
Header #
Header(
*,
icon: Optional[
Union[TemplatedStringItem, DataField]
] = None,
title: Optional[
Union[TemplatedStringItem, DataField]
] = None,
item: Optional[HeaderNumberItem] = None,
link: Optional[Actions] = None
)
Spec for Tile Header.
Construct spec for the Tile Widget Header.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
icon |
Optional[Union[TemplatedStringItem, DataField]]
|
str that will be icon of header. |
None
|
title |
Optional[Union[TemplatedStringItem, DataField]]
|
str that will be title of header. |
None
|
item |
Optional[HeaderNumberItem]
|
tile header number item. |
None
|
link |
Optional[Actions]
|
action widget link spec. |
None
|
Create a Tile widget with a header
HeaderNumberItem #
HeaderNumberItem(
*,
value_key: TemplatedStringItem,
formatting: Optional[NumberFormatting] = None,
label: Optional[
Union[TemplatedStringItem, DataField]
] = None,
styling: Optional[TileHeaderNumberStyling] = None
)
Spec for Tile Header Number Item.
Construct spec for the Tile Header Number Item class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value_key |
TemplatedStringItem
|
key in data that will have the values used by the item. |
required |
formatting |
Optional[NumberFormatting]
|
formatting spec. |
None
|
label |
Optional[Union[TemplatedStringItem, DataField]]
|
label the item values. |
None
|
styling |
Optional[TileHeaderNumberStyling]
|
styling spec for number header item. |
None
|
HeaderNumberItem Styling#
NumberStylingChip #
NumberStylingChip(
*,
color_spec: ColorSpec,
data_column: Optional[TemplatedStringItem] = None
)
Spec for Number Chip Styling class.
Construct spec for Number Chip Styling.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
color_spec |
ColorSpec
|
specs for color. |
required |
data_column |
Optional[TemplatedStringItem]
|
styling value key. Defaults to None. |
None
|
NumberStylingDot #
NumberStylingDot(
*,
color_spec: ColorSpec,
data_column: Optional[TemplatedStringItem] = None
)
Spec for Number Dot Styling class.
Construct spec for Number Dot Styling.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
color_spec |
ColorSpec
|
specs for color. |
required |
data_column |
Optional[TemplatedStringItem]
|
styling value key. |
None
|
NumberStylingFont #
NumberStylingFont(
*,
color_spec: ColorSpec,
data_column: Optional[TemplatedStringItem] = None
)
Spec for Number Font Styling class.
Construct spec for Number Font Styling.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
color_spec |
Optional[ColorSpec
|
specs for color. |
required |
data_column |
Optional[TemplatedStringItem]
|
styling value key. Defaults to None. |
None
|
Items#
NumberItem #
NumberItem(
*,
data_column: TemplatedStringItem,
formatting: Optional[NumberFormatting] = None,
label: Optional[
Union[TemplatedStringItem, DataField]
] = None,
required: bool = True,
styling: Optional[TileNumberStyling] = None
)
Spec for Tile Number Item.
Construct spec for the Tile Number Item class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_column |
TemplatedStringItem
|
key in data that will have the values used by the item. |
required |
formatting |
Optional[NumberFormatting]
|
formatting spec. |
None
|
label |
Optional[Union[TemplatedStringItem, DataField]]
|
str that will label the item values. |
None
|
required |
bool
|
Flag to make Number item mandatory. If required is True and no Data the widget will show an error. If required is False and no Data, the item is not shown. |
True
|
styling |
Optional[TileNumberStyling]
|
styling spec for number item. |
None
|
TextItem #
TextItem(
*,
data_column: TemplatedStringItem,
formatting: Optional[TextFormatting] = None,
label: Optional[
Union[TemplatedStringItem, DataField]
] = None,
required: bool = True,
styling: Optional[TileTextStyling] = None
)
Spec for Tile content text Item.
Construct spec for the Tile Text Item class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_column |
TemplatedStringItem
|
key in data that will have the valuesused by the item. |
required |
formatting |
formatting spec. |
None
|
|
label |
Optional[Union[TemplatedStringItem, DataField]]
|
str that will label the item values. |
None
|
required |
bool
|
Flag to make Number item mandatory. If required is True and no Data the widget will show an error. If required is False and no Data, the item is not shown. |
True
|
styling |
Optional[TileTextStyling]
|
styling spec for text item.spec for a fixed reference line. |
None
|
DateItem #
DateItem(
*,
data_column: TemplatedStringItem,
formatting: Optional[DateTimeFormatting] = None,
label: Optional[
Union[TemplatedStringItem, DataField]
] = None,
required: bool = True
)
Spec for Tile Date Item.
Construct spec for the Tile Date Item class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_column |
TemplatedStringItem
|
key in data that will have the values used by the item. |
required |
formatting |
Optional[DateTimeFormatting]
|
formatting spec. |
None
|
label |
Optional[Union[TemplatedStringItem, DataField]]
|
str that will label the item values. |
None
|
required |
bool
|
Flag to make Number item mandatory. If required is True and no Data the widget will show an error. If required is False and no Data, the item is not shown. |
True
|
LineChartItem #
LineChartItem(
*,
data_column: TemplatedStringItem,
reference_line: Optional[
Union[int, float, DataField]
] = None,
styling: Optional[
Union[Palette, LineChartItemStyling]
] = None,
formatting: Optional[NumberFormatting] = None,
label: Optional[
Union[TemplatedStringItem, DataField]
] = None,
tooltip: Optional[ChartTooltip] = None,
required: bool = True
)
Spec for Tile Line Chart Item.
Construct spec for the TileLineChartItem class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_column |
TemplatedStringItem
|
key in data that will have the values used by the item. |
required |
reference_line |
Optional[Union[int, float, DataField]]
|
spec for a fixed reference line. |
None
|
styling |
Optional[Union[Palette, LineChartItemStyling]]
|
styling spec for item charts. |
None
|
formatting |
Optional[NumberFormatting]
|
formatting spec. |
None
|
label |
Optional[Union[TemplatedStringItem, DataField]]
|
label the item values. |
None
|
tooltip |
Optional[ChartTooltip]
|
specs for tooltip. |
None
|
required |
bool
|
Flag to make Number item mandatory. If required is True and no Data the widget will show an error. If required is False and no Data, the item is not shown. |
True
|
ColumnChartItem #
ColumnChartItem(
*,
data_column: TemplatedStringItem,
reference_line: Optional[
Union[int, float, DataField]
] = None,
styling: Optional[
Union[Palette, ColumnChartItemStyling]
] = None,
formatting: Optional[NumberFormatting] = None,
label: Optional[
Union[TemplatedStringItem, DataField]
] = None,
tooltip: Optional[ChartTooltip] = None,
required: bool = True
)
Spec for Tile Column Chart Item.
Construct spec for the TileColumnChartItem class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
reference_line |
Optional[Union[int, float, DataField]]
|
spec for a fixed reference line. |
None
|
styling |
Optional[Union[Palette, ColumnChartItemStyling]]
|
styling spec for item charts. |
None
|
data_column |
TemplatedStringItem
|
key in data that will have the values used by the item. |
required |
formatting |
Optional[NumberFormatting]
|
formatting spec. |
None
|
label |
Optional[Union[TemplatedStringItem, DataField]]
|
label the item values. |
None
|
tooltip |
Optional[ChartTooltip]
|
specs for tooltip. |
None
|
required |
bool
|
Flag to make Number item mandatory. If required is True and no Data the widget will show an error. If required is False and no Data, the item is not shown. |
True
|
AreaChartItem #
AreaChartItem(
*,
data_column: TemplatedStringItem,
reference_line: Optional[
Union[int, float, DataField]
] = None,
styling: Optional[
Union[Palette, AreaChartItemStyling]
] = None,
formatting: Optional[NumberFormatting] = None,
label: Optional[
Union[TemplatedStringItem, DataField]
] = None,
tooltip: Optional[ChartTooltip] = None,
required: bool = True
)
Spec for Tile Area Chart Item.
Construct spec for the TileAreaChartItem class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
reference_line |
Optional[Union[int, float, DataField]]
|
spec for a fixed reference line. |
None
|
styling |
Optional[Union[Palette, AreaChartItemStyling]]
|
styling spec for item charts. |
None
|
data_column |
TemplatedStringItem
|
key in data that will have the values used by the item. |
required |
formatting |
Optional[NumberFormatting]
|
formatting spec. |
None
|
label |
Optional[Union[TemplatedStringItem, DataField]]
|
str that will label the item values. |
None
|
tooltip |
Optional[ChartTooltip]
|
specs for tooltip. |
None
|
required |
bool
|
Flag to make Number item mandatory. If required is True and no Data the widget will show an error. If required is False and no Data, the item is not shown. |
True
|
StackedBarChartItem #
StackedBarChartItem(
*,
data_column: TemplatedStringItem,
bar_label_key: TemplatedStringItem,
styling: Optional[
Union[Palette, StackedBarChartItemStyling]
] = None,
formatting: Optional[NumberFormatting] = None,
label: Optional[TemplatedStringItem] = None,
required: bool = True
)
Spec for Tile Stack Bar Chart Item.
Construct spec for the TileColumnChartItem class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_column |
TemplatedStringItem
|
key in data that will have the values used by the item. |
required |
bar_label_key |
TemplatedStringItem
|
key in data that will have the labels used by each bar. |
required |
styling |
Optional[Union[Palette, StackedBarChartItemStyling]]
|
styling spec for item charts. |
None
|
formatting |
Optional[NumberFormatting]
|
formatting spec. |
None
|
label |
Optional[TemplatedStringItem]
|
str that will label the item values. |
None
|
required |
bool
|
Flag to make Number item mandatory. If required is True and no Data the widget will show an error. If required is False and no Data, the item is not shown. |
True
|
Items Styling#
NumberItemStyling#
NumberStylingArrow #
NumberStylingArrow(
*,
data_column: Optional[TemplatedStringItem] = None,
color_divergent: Divergent
)
Spec for Number Arrow Styling class.
Construct spec Number Arrow Styling.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
color_divergent |
ColorDivergent
|
specs for color. |
required |
data_column |
TemplatedStringItem
|
styling value key. |
None
|
NumberStylingChip #
NumberStylingChip(
*,
color_spec: ColorSpec,
data_column: Optional[TemplatedStringItem] = None
)
Spec for Number Chip Styling class.
Construct spec for Number Chip Styling.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
color_spec |
ColorSpec
|
specs for color. |
required |
data_column |
Optional[TemplatedStringItem]
|
styling value key. Defaults to None. |
None
|
NumberStylingDot #
NumberStylingDot(
*,
color_spec: ColorSpec,
data_column: Optional[TemplatedStringItem] = None
)
Spec for Number Dot Styling class.
Construct spec for Number Dot Styling.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
color_spec |
ColorSpec
|
specs for color. |
required |
data_column |
Optional[TemplatedStringItem]
|
styling value key. |
None
|
NumberStylingFont #
NumberStylingFont(
*,
color_spec: ColorSpec,
data_column: Optional[TemplatedStringItem] = None
)
Spec for Number Font Styling class.
Construct spec for Number Font Styling.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
color_spec |
Optional[ColorSpec
|
specs for color. |
required |
data_column |
Optional[TemplatedStringItem]
|
styling value key. Defaults to None. |
None
|
TextItemStyling#
TextStylingDot #
TextStylingDot(
*,
color_spec: Optional[ColorSpec] = None,
data_column: Optional[TemplatedStringItem] = None
)
Spec for Text Dot Styling Class.
Construct spec for Text Dot Styling.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
color_spec |
Optional[ColorSpec
|
specs for color. |
None
|
data_column |
Optional[TemplatedStringItem]
|
styling value key. Defaults to None. |
None
|
TextStylingFont #
TextStylingFont(
*,
color_spec: Optional[ColorSpec] = None,
data_column: Optional[TemplatedStringItem] = None
)
Spec for Text Font Styling Class.
Construct spec for Text Font Styling.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
color_spec |
ColorSpec
|
specs for color. |
None
|
data_column |
Optional[TemplatedStringItem]
|
styling value key. Defaults to None. |
None
|
LineChartItemStyling #
LineChartItemStyling(
*,
color_spec: Optional[ColorSpec] = None,
data_column: Optional[TemplatedStringItem] = None
)
Spec for styling used by Spark Line Chart Item.
Construct for BaseItemStyling class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
color_spec |
Optional[ColorSpec]
|
specs for color. |
None
|
data_column |
Optional[TemplatedStringItem]
|
styling value key. |
None
|
ColumnChartItemStyling #
ColumnChartItemStyling(
*,
color_spec: Optional[ColorSpec] = None,
data_column: Optional[TemplatedStringItem] = None
)
Spec for styling used by Spark Column Chart Item.
Construct for BaseItemStyling class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
color_spec |
Optional[ColorSpec]
|
specs for color. |
None
|
data_column |
Optional[TemplatedStringItem]
|
styling value key. |
None
|
AreaChartItemStyling #
AreaChartItemStyling(
*,
color_spec: Optional[ColorSpec] = None,
data_column: Optional[TemplatedStringItem] = None
)
Spec for styling used by Spark Area Chart Item.
Construct for BaseItemStyling class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
color_spec |
Optional[ColorSpec]
|
specs for color. |
None
|
data_column |
Optional[TemplatedStringItem]
|
styling value key. |
None
|
StackedBarChartItemStyling #
StackedBarChartItemStyling(
*,
color_spec: Optional[ColorSpec] = None,
data_column: Optional[TemplatedStringItem] = None
)
Spec for styling used by Stacked Bar Chart Item.
Construct for BaseItemStyling class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
color_spec |
Optional[ColorSpec]
|
specs for color. |
None
|
data_column |
Optional[TemplatedStringItem]
|
styling value key. |
None
|
Types#
TileContentItem
module-attribute
#
TileContentItem = Union[
NumberItem,
DateItem,
TextItem,
AreaChartItem,
ColumnChartItem,
LineChartItem,
StackedBarChartItem,
]
Enums#
Orientation #
Options for orientation of Tile Widget.
Attributes:
Name | Type | Description |
---|---|---|
VERTICAL |
str
|
Vertical orientation. |
HORIZONTAL |
str
|
Horizontal orientation. |