feat(charts): add x-axis column configuration for line charts#506
Merged
palewire merged 1 commit intochekos:mainfrom Nov 7, 2025
Merged
feat(charts): add x-axis column configuration for line charts#506palewire merged 1 commit intochekos:mainfrom
palewire merged 1 commit intochekos:mainfrom
Conversation
Add support for specifying the x-axis column in line charts through a new `x_column` field. This allows users to explicitly set which data column should be used for the x-axis. Changes: - Add `x_column` field to LineChart model with alias "x-column" - Serialize x_column to metadata.axes.x when creating/updating charts - Deserialize axes.x back to x_column when loading existing charts - Include field documentation and type hints (str | None) This enhancement provides more control over chart axis configuration and maintains consistency with Datawrapper's API structure.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for specifying which column to use for the x-axis in line charts by introducing an x_column field. This brings LineChart more in line with ScatterPlot's API design.
- Added
x_columnfield to LineChart model with proper Field definition and alias - Updated
serialize_modelto writex_columntometadata["axes"]["x"]when provided - Updated
deserialize_modelto parsex_columnfrommetadata["axes"]["x"]
💡 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.
Add support for specifying the x-axis column in line charts through a new
x_columnfield. This allows users to explicitly set which data column should be used for the x-axis.Changes:
x_columnfield to LineChart model with alias "x-column"This enhancement provides more control over chart axis configuration and maintains consistency with Datawrapper's API structure.