You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Let asset chart data rest on the registry of chart types #2802
Follow-up to #2795 (the registry of asset chart types) and #2790 (chart data per chart type). Both should be merged first.
#2790 lets GET /api/v3_0/assets/<id>/chart_data take chart-type, so the asset page loads only the data the chosen chart draws. In v1.1.0 that parameter takes the chart function names and is left out of the API docs. Once the registry is merged, chart_data should rest on it:
chart-type on chart_data takes the registry's public names (default, charge-point-sessions, and any a plugin registers), validated as on /chart. It also still accepts the function names the asset page sent in v1.1.0. The parameter is then documented.
The sensors per chart type come from the chart type's layout in the registry, not from separate rules in GenericAsset.chart_sensors.
asset.chart(include_data=True), and so GET /api/v3_0/assets/<id>/chart?include-data=true, inlines only the data of the chart type's own sensors, as chart_data does.
The fast (ECharts) renderer gets the Charge Points chart's names from the page and fails loudly without them, rather than falling back to copies of its own.
A local branch does all of this already (built on #2790 plus the registry, with tests). It needs a fresh PR once both are merged.
Activity