Skip to content

infobox/chart: support InfluxDB ALIAS BY for multi-series queries#417

Draft
grische wants to merge 1 commit into
freifunk:mainfrom
grische:chart-alias-by
Draft

infobox/chart: support InfluxDB ALIAS BY for multi-series queries#417
grische wants to merge 1 commit into
freifunk:mainfrom
grische:chart-alias-by

Conversation

@grische

@grische grische commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Description

A GROUP BY tag InfluxDB query returns one frame per tag value, but without an ALIAS BY pattern those frames come back with the default measurement/field name, so the chart cannot label or colour them per series.

Add an optional Chart.alias config field and forward it to the /api/ds/query request as the InfluxDB query's alias property. The pattern (e.g. "$tag_domain") runs through the same substitution as the query. Single-series queries omit it and are unaffected.

Motivation and Context

We wanted to see clients per segment

How Has This Been Tested?

https://map.ffmuc.net/#/en/map:~:text=Clients%20pro%20Segment

Screenshots/links:

Before

grafik

After

grafik

Checklist:

  • My code follows the code style of this project. (CI will test it anyway and also needs approval)
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.

A GROUP BY tag InfluxDB query returns one frame per tag value, but
without an ALIAS BY pattern those frames come back with the default
measurement/field name, so the chart cannot label or colour them per
series.

Add an optional Chart.alias config field and forward it to the
/api/ds/query request as the InfluxDB query's `alias` property. The
pattern (e.g. "$tag_domain") runs through the same substitution as the
query. Single-series queries omit it and are unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Preview deployed: https://freifunk.github.io/meshviewer/pr-preview/pr-417/

Updated for commit 2579cc0.

github-actions Bot pushed a commit that referenced this pull request Jul 2, 2026
@skorpy2009

skorpy2009 commented Jul 2, 2026

Copy link
Copy Markdown
Member

Please add an example config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants