Skip to content

feat(Chart): add AutoSkip parameter#1060

Merged
ArgoZhang merged 2 commits into
masterfrom
feat-chart
Jul 11, 2026
Merged

feat(Chart): add AutoSkip parameter#1060
ArgoZhang merged 2 commits into
masterfrom
feat-chart

Conversation

@ArgoZhang

@ArgoZhang ArgoZhang commented Jul 11, 2026

Copy link
Copy Markdown
Member

Link issues

fixes #1059

Summary By Copilot

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Merge the latest code from the main branch

Summary by Sourcery

New Features:

  • Introduce an AutoSkip option on chart axes to enable or disable automatic skipping of tick labels for x, y, and secondary y axes.

@bb-auto bb-auto Bot added the enhancement New feature or request label Jul 11, 2026
@bb-auto bb-auto Bot added this to the v10.0.0 milestone Jul 11, 2026
@sourcery-ai

sourcery-ai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds support for configuring tick auto-skipping on chart axes by wiring a new AutoSkip property from the ChartAxes C# model through to the Chart.js ticks configuration for x, y, and secondary y (y2) axes.

Sequence diagram for propagating AutoSkip to Chart.js ticks

sequenceDiagram
    participant ChartAxes
    participant ChartOption as option
    participant getChartOption
    participant ChartJS

    ChartAxes->>ChartOption: set AutoSkip
    ChartOption->>getChartOption: option.options.x.autoSkip
    getChartOption->>ChartJS: configure x.ticks.autoSkip
    ChartOption->>getChartOption: option.options.y.autoSkip
    getChartOption->>ChartJS: configure y.ticks.autoSkip
    ChartOption->>getChartOption: option.options.y2.autoSkip
    getChartOption->>ChartJS: configure y2.ticks.autoSkip
Loading

File-Level Changes

Change Details Files
Expose an AutoSkip option on chart axes and pass it through to Chart.js tick configuration for all relevant axes.
  • Add an AutoSkip boolean property with a default value of true to the ChartAxes model, including XML documentation describing its behavior.
  • Update Chart.razor.js to include a ticks.autoSkip field for the primary x and y axes, driven by option.options.x.autoSkip and option.options.y.autoSkip.
  • Extend the secondary y-axis (y2) ticks configuration in Chart.razor.js to set ticks.autoSkip from option.options.y2.autoSkip alongside existing max/min settings.
src/components/BootstrapBlazor.Chart/Components/Chart/ChartAxes.cs
src/components/BootstrapBlazor.Chart/Components/Chart/Chart.razor.js

Assessment against linked issues

Issue Objective Addressed Explanation
#1059 Add an AutoSkip parameter/property to chart axis configuration (ChartAxes) with a sensible default to control automatic skipping of tick labels.
#1059 Wire the AutoSkip parameter into the chart rendering logic so that the underlying chart library’s ticks.autoSkip option is set for all relevant axes (x, y, y2).

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@bb-auto bb-auto Bot 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.

Auto approved by bb-auto

@ArgoZhang ArgoZhang merged commit 7d59a25 into master Jul 11, 2026
3 checks passed
@ArgoZhang ArgoZhang deleted the feat-chart branch July 11, 2026 06:06

@sourcery-ai sourcery-ai Bot 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.

Hey - I've left some high level feedback:

  • Consider defaulting autoSkip in Chart.razor.js when the value is undefined or null (e.g., falling back to Chart.js’ own defaults or the C# default) to avoid unexpected behavior if the options object is partially populated.
  • On the secondary Y axis (y2), confirm that adding autoSkip into the existing ticks object does not unintentionally override other tick-related configuration that might be set elsewhere; if necessary, merge with any existing ticks options instead of redefining the object.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider defaulting `autoSkip` in `Chart.razor.js` when the value is undefined or null (e.g., falling back to Chart.js’ own defaults or the C# default) to avoid unexpected behavior if the options object is partially populated.
- On the secondary Y axis (`y2`), confirm that adding `autoSkip` into the existing `ticks` object does not unintentionally override other tick-related configuration that might be set elsewhere; if necessary, merge with any existing `ticks` options instead of redefining the object.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(Chart): add AutoSkip parameter

1 participant