-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Feature/radar chart vertice label #1914
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
base: main
Are you sure you want to change the base?
Conversation
|
I didn't get what the difference between |
|
And your sample looks beautiful. Can you please add it in our samples list? |
|
@imaNNeo |
| final TextStyle? titleTextStyle; | ||
|
|
||
| /// Defines style of showing [RadarChart] vertice labels. | ||
| final TextStyle? verticeLabelTextStyle; |
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.
It seems you forgot to add this verticeLabelTextStyle property in the copyWith and lerp functions
| } | ||
|
|
||
| /// Defines a label for [RadarChart] vertices | ||
| class RadarChartVerticeLabel { |
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.
| /// [positionPercentageOffset] is the place of showing label on the [RadarChart] vertices | ||
| /// The higher the value of this field, the more labels move away from the chart vertices. | ||
| /// This value should be between 0 and 1 | ||
| final double? positionPercentageOffset; |
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.
Can we just add a final double offset; here? I mean it makes it much simpler, as we know where it draws (at the position of our vertex point). So we can just have a simple offest property



Summary
Added a new feature to display labels at each vertex of the RadarChart.
Fixes this issue: #1886
What's included
New Classes and Methods
RadarChartVerticeLabelclass to handle vertex label configurationtext: Displays the label textpositionPercentageOffset: Controls label position relative to vertexTests
Added comprehensive test cases for
drawVerticeLabels:Screenshot