-
-
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
Doesn't work with big data #54
Comments
I'm having the same issue too. |
@andynguy3n @tauitdnmd I was having similar issue, when large data is passed app becomes unresponsive and might crash too. |
Same issue |
It's gonna be closed if I don't get any answer in a day because I tested it and it works in new versions. |
Thanks @imaNNeoFighT , |
Unfortunately, I'm gonna close it soon |
I think with this number it doesn't work Since the Unix timestamp is int, I covert to double by using this function
Then try with 5 items
|
Hi guys, I know your problem, but not sure what could we do, |
Thanks. I'll try. Have a good day. |
For |
Hi @18601673727 |
The line just looks too art-y don't you think sir? |
Sorry I didn't understand. |
I mean I'm expecting the line to be still "singe-directioned" not twisted when |
Can you give me your simplified code to reproduce? |
I think you can use this class to help you scale the values to keep the number inside the range configured to class ScaleLinear {
ScaleLinear({
required this.domainMin,
required this.domainMax,
required this.rangeMin,
required this.rangeMax,
}) : targetRange = rangeMax - rangeMin,
domainRange = domainMax - domainMin;
final num targetRange;
final num domainRange;
final num domainMin;
final num domainMax;
final num rangeMin;
final num rangeMax;
double calc(num value) {
return (value - domainMin) * targetRange / domainRange + rangeMin;
}
double invert(num value) {
return (value - rangeMin) * domainRange / targetRange + domainMin;
}
}
void main() {
final y = ScaleLinear(
domainMin: 4500,
domainMax: 10000,
rangeMin: 1,
rangeMax: 10,
);
print(y.calc(10000)); // 10
print(y.calc(8000)); // 6.7272727272727275
print(y.calc(4500)); // 1
// Invert
print(y.invert(10)); // 10000
print(y.invert(6.7272727272727275)); // 8000
print(y.invert(1)); // 4500
} |
Could you elaborate on what exactly is this problem? |
Currently,
I'm fetching the data from this API (https://api.coincap.io/v2/assets/bitcoin/history?interval=d1)
I created a FlSpot with these values:
FlSpot(2757.4283650019844275, 1501718400000.1)
The chart doesn't work and the app stops working as well.
The text was updated successfully, but these errors were encountered: