flexmeasures.data.models.charts
Modules
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 listed in 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.
- Returns:
A dictionary containing a vega-lite chart specification
- Raises:
UnknownChartType – if the chart type is not in CHART_TYPES.
Exceptions
- exception flexmeasures.data.models.charts.UnknownChartType
Raised for a chart type that is not among the CHART_TYPES.