Add multiLevelAxis - #641
Merged
Merged
Conversation
schaumb
force-pushed
the
multilabel_on_axis
branch
from
September 26, 2025 19:26
7341a5f to
3dce41e
Compare
There was a problem hiding this comment.
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
labelLevelfrom 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.