flexmeasures.data.models.charts
Modules
The registries of chart types: the one place that lists the charts an asset or a sensor can be drawn as. |
|
Shared Vega-Lite transforms for chart source labels. |
Functions
- flexmeasures.data.models.charts.chart_type_to_chart_specs(chart_type: str, **kwargs) dict
Create chart specs of a given chart type, using FlexMeasures defaults for settings like width and height.
Only the chart types in the registry of sensor chart types (CHART_TYPES) are built, so a request cannot reach other functions or data in the chart modules.
- Parameters:
chart_type – Name of a chart type in CHART_TYPES, or its legacy name (e.g. “bar_chart” for “bar-chart”).
- Returns:
A dictionary containing a vega-lite chart specification
- Raises:
UnknownChartType – if the chart type is not in CHART_TYPES.