Pen catalogue: read units, per-pen scale, visibility and multiple groups

Open
#65 0 comments 0 reactions 1 assignee View on GitHub

@mrcsin is already working on this.

Since Sep 10, 2026.

Assessment

This issue has not been assessed yet.

Description

enhancement

Why

A pen carries only PenId, Name, Group, Color, LineStyle (SemiPlot.Core/Trends/Pen.cs:3-7). The catalogue query never selects unit (SemiPlot.DataSource.Postgres/ArchiveStatements.cs:21-25), a pen has one group, its scale is stored nowhere, and there is no stored visibility. Semiteq/SemiBase#9 extends the schema; this is the client half.

Wanted

  • Pen grows Unit, Enabled, ScaleMin, ScaleMax (both nullable, NULL meaning autoscale) and Groups as a list instead of a single Group.
  • ArchiveStatements.PenCatalog reads the new shape: semiplot_tags joined to semiplot_pen_groups and semiplot_groups. The current ORDER BY coalesce(group_name, ''), name has to go, because a pen now has several groups and no single sort key.
  • PostgresDataProvider maps the rows (PostgresDataProvider.cs:437-462). It already logs and falls back on an unknown line_style; color gets the same treatment instead of today's new Color("") on a NULL row (Chart/TrendChartViewModel.cs:367, Legend/LegendConverters.cs:11-12).
  • The startup probe refuses a database whose semiplot_meta.schema_version is older than this client, reporting it in the existing startup-failure window rather than throwing on a missing column.
  • The bench seeder fills the new tables. SyntheticPenCatalog already holds MinValue and MaxValue per pen with nowhere to store them (SemiPlot.Tools.ArchiveSeeder/SyntheticPenCatalog.cs:24-36) and assigns colours round-robin (:14-18). It gains units per group and writes the group tables through TagCatalogWriter (TagCatalogWriter.cs:10-19).
  • Legend headers come from group membership. A pen in two groups appears under both. A pen with no group shows under one "Ungrouped" header.
  • Docs: docs/architecture/postgres-instance.md (the table description, and the line at :70 recording that no query reads unit), data-integration.md, bench.md.

Notes

  • The catalogue is read once at startup (App.axaml.cs:121-124) and Pen is immutable. Re-reading a changed configuration in a running viewer belongs to #67.
  • The stored per-pen scale is consumed by #66, which replaces the group axis key.
Dominant language
C#
Stars
0
Forks
0
Avg merge
18m
Merged PRs (30d)
42

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Semiteq/SemiPlot

All issues in Semiteq/SemiPlot

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.