Feat/radar max value config
hello ,This PR is aims to add this feature in https://github.com/imaNNeo/fl_chart/issues/2002
Problem background
We encountered two problems in the issue.
- How to set the maximum value of the Radar Chart to a specified value.
- How to display the maximum tick value on the chart.
Solution
This PR introduces two new parameters to RadarChartData:
- maxValue Parameter
RadarChartData( dataSets: myDataSets, maxValue: 100.0, // Set custom maximum value )
- Type: double? (optional)
- Default: null (uses data maximum)
- Purpose: Allows setting a custom maximum value instead of calculating from data
- showMaxTick Parameter
RadarChartData( dataSets: myDataSets, showMaxTick: true, // Show maximum tick value )
- Type: bool
- Default: false (preserves existing behavior)
- Purpose: Controls whether the maximum tick is displayed on the chart
Result
Hi, thanks for your great contribution! I have some points to mention.
- I think instead of having a
showMaxTick, we can have acheckToShowTickresolver that the user can decide to show which ticks (it can be like a callback, likecheckToShowDotin LineChartData). This way, we can hide the max entry by default (to be backward compatible), also it adds a lot of customizability for other use cases. - I like the change for the
maxValueproperty, thanks a lot. I was thinking to have something forminValueas well (but not for now, let's keep this PR as simple as possible). But if you found time in the future, I would appreciate if you add theminValueas well to keep the consistency. - Please add the newly added property in the
radar_chart.mdfile.
Then we're good to go!
Hello , I sincerely apologize for the inconvenience, but the author account of this PR has been retired and can no longer be used.
Therefore, I have submitted a new PR using my new account, which implements the features based on the feedback. https://github.com/imaNNeo/fl_chart/pull/2025
Thank you.