Skip to content

feat(dialog-sdk): add per-series color and interactive chart legend#51

Merged
pabloinigoblasco merged 2 commits into
developmentfrom
feat/chart-series-color
Apr 14, 2026
Merged

feat(dialog-sdk): add per-series color and interactive chart legend#51
pabloinigoblasco merged 2 commits into
developmentfrom
feat/chart-series-color

Conversation

@pabloinigoblasco
Copy link
Copy Markdown
Collaborator

@pabloinigoblasco pabloinigoblasco commented Apr 13, 2026

Summary

  • ChartSeries::color optional hex field ("#rrggbb") — when set, overrides the Qt Charts theme color for that series
  • ChartPreviewWidget applies a QPen with the specified color after addSeries so the theme assignment does not win
  • Interactive legend: clicking a legend marker toggles the corresponding series visibility (label fades when hidden)
  • Matplotlib tab10 10-color palette defined for consistent default colors

Test plan

  • Build pj_plugins — no compile errors
  • Set color: "#ff7f0e" on a ChartSeries — chart preview renders the series in orange
  • Omit color — chart uses Qt Charts theme default
  • Click a legend marker — toggles series visibility, label fades

Extend ChartSeries with an optional color field (hex "#rrggbb") that
overrides the Qt Charts theme color for individual series. When set,
the ChartPreviewWidget applies a QPen with the specified color after
addSeries so the theme assignment does not win.

Add an interactive legend to ChartPreviewWidget: clicking a legend
marker toggles the corresponding series visibility (with faded label
when hidden). Define the matplotlib tab10 10-color palette for
consistent default colors across chart instances.
Remove setCodeContent, setCodeLanguage, codeContent and codeLanguage
from this branch — they were accidentally included from the source
commit but belong to the code editor PR (#43), not the chart color PR.
@pabloinigoblasco pabloinigoblasco merged commit d55813d into development Apr 14, 2026
2 checks passed
@pabloinigoblasco pabloinigoblasco deleted the feat/chart-series-color branch May 4, 2026 12:36
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.

1 participant