-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
The titles are crazy :) #130
Comments
They should be double because some people need to draw titles for example in every 0.5 intervals, and other reasons, I know the problem that you've faced. |
Yes, totally agree interval could be double. But double is subtype of num and therefore See: https://dartpad.dev/95cbc0f0a7cf41e0c45db20563d88f0b Thanks for developing this great lib :) |
I'm not with generic types, they are not type-safe, and here we need type safety because maybe we wanna calculate something that our input should be a double. |
use targetData to draw the titles, fixed #130.
Hi, |
No problem :) Thanks for fix it. Indeed 0.5.2 fixed bottom titles, because my minX is constants. But still I have some problems with left titles where minY is variable. Mostly because of |
You're welcome, may I ask you to create another issue to follow up the other problem? |
1 similar comment
You're welcome, may I ask you to create another issue to follow up the other problem? |
I’m using fl_chart: 0.5.1.
I know that fl_chart is not ready yet for animations etc (any milestones for that?). But still I wanted to try. App that I’m developing should draw time based line chart to which a spot is added for every X (let’s say 130) ms. Of course the chart should have some titles. Let’s assume that 0, ~1/2 Xmax, ~Xmax will be sufficient. I wrote some code using
titlesData.bottomTitles.interval
, basically I set it to floor of Xmax / 2. Sadly, in this configuration bottom titles have very strange values like:2.9999986785230
.When I add some logs things go worse. It seems that when I set interval it just starts to grow to an expected value instead of immediately getting a proper value.
It seems that some kind of (3 steps) animation is there (may be connected with some performance problems like #119),? but still I don’t know why when I set interval from 4 to 5, the chart got intervals: 4, 4.223606666666667, 4.447213333333333, 4.67082, […], 4.999999784850258, 5?
If you want to see an example code it is here https://github.com/plblueraven/crazy_titles
BTW. Is there any reason why things like intervals, title values, reservedSize etc are
double
s? In my opinion they could be just (Dart built in type)num
.The text was updated successfully, but these errors were encountered: