-
Notifications
You must be signed in to change notification settings - Fork 18
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
Custom label feature added #45
Conversation
/// ```dart | ||
/// child : const LinearGauge( | ||
/// customLabels: [ | ||
/// CustomLinearGaugeLabel(text: "1%", value: 10), |
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.
Indent is missing here for CustomLinearGaugeLabel
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.
Once we change the class name we need to change every where in the example and files
@@ -0,0 +1,40 @@ | |||
class CustomLinearGaugeLabel { |
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.
I think we need a small change here
can we change the class name to RulerCustomLabel
? I think that make more sense .
What do you think ?
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.
Yes agreed that will make more sense . Custom labels are for all gauges not only for linear. Will change that.
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.
Or how about maybe CustomRulerLabel
? Lets try to keep RulerLabel together
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.
As per terminology we used , labels are part of rulers only. So CustomRulerBar
or CustomRuler
can also work but for user CustomRulerLabel
make more sence . So what should be the final call
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.
This PR closes or fixes #28 issue

Now user can add CustomLabels to the linear gauge (shown in image below)
When users added custom labels starting and ending value of the linear gauge is set up according to the user custom labels

For this addCustomLabels function is added in linear_gauge_label.dart file

To create offset for labels new mathematical expression is created
