Skip to content

Add a funnel sample to the demo, and let a series set its label colour #75

Closed

Description

@davidnmbond

Add a funnel chart sample to the demo at https://chartmagic.panoramicdata.com/. The renderer has drawn funnels since #72.

Adding it exposed a gap: SeriesSpecification had no label colour. The renderer reads Series.FontColor, but the specification never set it, so every series label was black, including data labels, outside pie labels and funnel labels. On the demo's dark theme they could not be read.

Acceptance criteria

  • MUST The demo gallery has a Working "Funnel" sample that renders one labelled segment per stage.
  • MUST SeriesSpecification.FontColor sets the colour of that series' labels. It defaults to black, so existing output does not change.
  • MUST The demo themes series labels (theme.AxisLabel) unless the sample sets its own colour.

Activity

  1. davidnmbond commented on Sep 28, 2026

    @davidnmbond
    ContributorAuthor

    Done in 082b8c8 and live on https://chartmagic.panoramicdata.com/ (9.1.42).

    Criterion Evidence
    MUST Working "Funnel" sample with one labelled segment per stage DemoSampleTests.Funnel_IsInTheGallery_AsWorking and Funnel_RendersOneLabelledSegmentPerStage_InBothThemes. On the live site, the Funnel tab renders 5 segments per theme, labelled "Visitors: 1000" through "Customers: 260".
    MUST SeriesSpecification.FontColor sets the label colour, default black DataLabelAndFunnelTests.Funnel_LabelsAreDrawnInTheSeriesFontColor and ColumnChart_DataLabelsAreDrawnInTheSeriesFontColor. Red-checked: with the mapping line removed, all five new colour tests fail.
    MUST the demo themes series labels unless the sample sets its own DemoSampleTests.SeriesLabels_TakeTheThemeLabelColour_SoTheyAreReadableOnADarkPage (light and dark) and SeriesLabels_ASampleThatSetsItsOwnLabelColour_KeepsIt.

    Full suite: 113 passed, 0 failed.

    The sample data is deliberately shallow. Funnel labels are not moved apart when they collide, so realistic steep data (12000 down to 380) overlaps its last two labels. That is a renderer limitation, not something this change addresses.

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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions