Skip to content

Add multiLevelAxis - #641

Merged
veghdev merged 5 commits into
mainfrom
multilabel_on_axis
Apr 20, 2026
Merged

Add multiLevelAxis#641
veghdev merged 5 commits into
mainfrom
multilabel_on_axis

Conversation

@schaumb

@schaumb schaumb commented Sep 18, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@schaumb schaumb changed the title Add multiAxis Add multiLevelAxis Sep 21, 2025
@schaumb
schaumb marked this pull request as ready for review March 31, 2026 16:33
@schaumb
schaumb requested a review from Copilot March 31, 2026 16:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces support for multi-level (multi-dimension) labels on axes/legends by allowing labelLevel to be specified as a list, and updates the underlying marker/axis data structures and rendering/event plumbing accordingly. It also adds a new E2E feature test to exercise the new behavior.

Changes:

  • Extend labelLevel from a single index to a list and propagate that through options → marker IDs → axis/legend generation → rendering/events.
  • Update axis/legend label rendering to merge multiple dimension label parts into a single displayed string (, separated).
  • Add E2E coverage for multi-label behavior and register the new feature snapshot refs.

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/e2e/tests/features/multilabel.mjs Adds an E2E scenario covering labelLevel as single and list values on x and color.
test/e2e/tests/features.json Registers the new multilabel feature.
test/e2e/test_cases/test_cases.json Updates snapshot refs for a few existing cases.
src/dataframe/old/types.h Changes MarkerId::label to hold multiple SliceIndex parts.
src/dataframe/old/datatable.h Updates DataCube::getId signature to accept multiple label indices.
src/dataframe/old/datatable.cpp Builds a vector of label slices based on multiple requested label indices.
src/dataframe/impl/data_source.cpp Switches to std::views::reverse.
src/chart/rendering/drawlegend.h Updates legend marker drawing API to accept multiple slices.
src/chart/rendering/drawlegend.cpp Merges multi-part labels for rendering and event targets.
src/chart/rendering/drawaxes.h Updates dimension label indexing to multiple slices.
src/chart/rendering/drawaxes.cpp Uses merged multi-part labels for axis label drawing and event targets.
src/chart/options/options.h Reworks label-level selection and label-series resolution to return lists.
src/chart/options/options.cpp Adjusts legend auto-detection and label visibility checks for multiple label series.
src/chart/options/channel.h Introduces Channel::LabelLevelList parsing/formatting and changes labelLevel type.
src/chart/options/autoparam.h Constrains toString() to types that are stringifiable.
src/chart/main/stylesheet.cpp Uses merged labels when measuring label text boundaries.
src/chart/main/style.cpp Fixes trailing commas in initializer lists.
src/chart/main/events.h Updates category/marker event targets to carry multiple slice indices; makes drawn text owned (std::string).
src/chart/generator/plotbuilder.h Updates bucket sort/separation metadata to use multi-slice indices and owned labels.
src/chart/generator/plotbuilder.cpp Merges labels for sorting/titles; updates axis/legend logic for multi-slice labels.
src/chart/generator/buckets.h Switches to std::views::transform.
src/chart/generator/axis.h Switches axis dimension keys/parts to multi-slice keys; adds merged-label helpers.
src/chart/generator/axis.cpp Updates interpolation/legend logic for partially-common dimension keys.
src/base/type/uniquelist.h Switches to std::views::keys and adds needed includes.
src/base/refl/auto_accessor.h Switches to std::views::keys.
src/base/math/renard.h Initializes span member to {}.
src/base/geom/rect.h Switches to std::views::transform.
CHANGELOG.md Adds an unreleased entry describing multi-label support.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/chart/options/options.h
Comment thread src/chart/options/channel.h
Comment thread CHANGELOG.md
@veghdev
veghdev merged commit ed495a9 into main Apr 20, 2026
4 of 5 checks passed
@veghdev
veghdev deleted the multilabel_on_axis branch April 20, 2026 12:38
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.

3 participants