Skip to content

chart: Add x_axis option.#2094

Merged
madcodelife merged 6 commits intolongbridge:mainfrom
victorhqc:hide-x-grid
Feb 26, 2026
Merged

chart: Add x_axis option.#2094
madcodelife merged 6 commits intolongbridge:mainfrom
victorhqc:hide-x-grid

Conversation

@victorhqc
Copy link
Contributor

@victorhqc victorhqc commented Feb 25, 2026

Description

Allows hiding the x-axis for Area, Line, Bar, and Candlestick charts. The axis shows by default, but you can turn it off. Hiding the axis and labels makes the chart slightly larger because there's more space.

Screenshot

Before After
Screenshot 2026-02-25 at 23 09 37 Screenshot 2026-02-25 at 23 19 49
Screenshot 2026-02-25 at 23 09 08 Screenshot 2026-02-25 at 23 19 29
Screenshot 2026-02-25 at 23 09 50 Screenshot 2026-02-25 at 23 19 58
Screenshot 2026-02-25 at 23 09 22 Screenshot 2026-02-25 at 23 19 40

Break Changes

- PlotAxis::new().hide_x_axis();
+ PlotAxis::new().x_axis(false);
- PlotAxis::new().hide_y_axis();
+ PlotAxis::new().y_axis(false);

How to Test

Simply use the charts as

CandlestickChart::new(data).x_axis(false)

Checklist

  • I have read the CONTRIBUTING document and followed the guidelines.
  • Reviewed the changes in this PR and confirmed AI generated code (If any) is accurate.
  • Passed cargo run for story tests related to the changes.
  • Tested macOS, Windows and Linux platforms performance (if the change is platform-specific)

@victorhqc victorhqc changed the title feat: show_x_axis() feat: hide_x_axis() Feb 25, 2026
@huacnlee huacnlee changed the title feat: hide_x_axis() chart: Add x_axis option. Feb 26, 2026
@madcodelife
Copy link
Member

Thank you!

@madcodelife madcodelife merged commit cf19304 into longbridge:main Feb 26, 2026
3 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.

3 participants