Skip to content

Let asset chart data rest on the registry of chart types #2802

Open

Description

@Flix6x

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.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UBBvKZkzbfEPKctwTN8SDf

Activity

  1. added this to the 1.2.0 milestone on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions