Skip to content

feat(charts): add x-axis column configuration for line charts#506

Merged
palewire merged 1 commit intochekos:mainfrom
palewire:line-x-column
Nov 7, 2025
Merged

feat(charts): add x-axis column configuration for line charts#506
palewire merged 1 commit intochekos:mainfrom
palewire:line-x-column

Conversation

@palewire
Copy link
Collaborator

@palewire palewire commented Nov 7, 2025

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.

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.
@palewire palewire requested a review from Copilot November 7, 2025 20:48
Copy link
Contributor

Copilot AI left a comment

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 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_column field to LineChart model with proper Field definition and alias
  • Updated serialize_model to write x_column to metadata["axes"]["x"] when provided
  • Updated deserialize_model to parse x_column from metadata["axes"]["x"]

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

@palewire palewire merged commit db0afc8 into chekos:main Nov 7, 2025
15 checks passed
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