-
-
Notifications
You must be signed in to change notification settings - Fork 362
fix(Chart): support custom label formatter #6778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR updates the Bar chart sample to showcase custom label formatting by enabling data labels and switching to decimal data points, and it updates the server project file to reference the chart library version that includes the new formatter support. Class diagram for updated Bar chart sample data initializationclassDiagram
class ChartDataSource {
Options : ChartOptions
Labels : IEnumerable<string>
Data : List<ChartDataset>
}
class ChartOptions {
Title : string
ShowDataLabel : bool
X : AxisOptions
Y : AxisOptions
}
class AxisOptions {
Title : string
Stacked : bool
}
class ChartDataset {
Label : string
Data : IEnumerable<object>
}
ChartDataSource --> ChartOptions : has
ChartDataSource --> ChartDataset : contains
ChartOptions --> AxisOptions : has X, Y
ChartDataSource : +OnInit(bool stacked, bool setTitle = true)
ChartOptions : +ShowDataLabel (added)
ChartDataset : +Data (now decimal values)
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Fixes chart custom label formatter support by enabling data labels and updating chart data generation to use decimal values instead of integers, along with upgrading the BootstrapBlazor.Chart package version.
- Enables data labels on bar charts by setting
ShowDataLabel = true - Changes chart data generation to produce decimal values (dividing by 10.0f) for better label formatting demonstration
- Updates BootstrapBlazor.Chart package from version 9.0.0 to 9.0.1
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Bar.razor.cs | Enables data labels and modifies data generation to use decimal values |
| BootstrapBlazor.Server.csproj | Updates BootstrapBlazor.Chart package to version 9.0.1 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6778 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 739 739
Lines 31721 31721
Branches 4464 4464
=========================================
Hits 31721 31721
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Link issues
fixes #6776
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Update Bar chart sample to display data labels by default and use decimal data values
Enhancements: