-
-
Notifications
You must be signed in to change notification settings - Fork 119
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
Scaling graph given large data set #192
Comments
Hello! |
Thanks for the quick reply above! I had the exact same question. With the default settings, the scaling is also not sufficient for my data :( My data set is even much larger: 7500 entries, where I would like to display a subset of about 500-750 entries at a time on screen - still being able to zoom in until a subset of 50 entries is displayed... Very similar to the request above. Will the library handle such large data sets? Is there a way, to specify the initial zoom state? Currently, with my test data sets (about 500 entries) I have to zoom out manually quite long, and still cannot see the whole data because there seems to be a limit: |
The initial zoom factor (which is 1) can’t be changed, @tobbyd, because the segment width is customizable. If you were to set the segment width to something around 1 dp, you’d end up having several hundred entries visible initially. Admittedly, though, Vico’s APIs weren’t designed with such charts in mind. We’d be happy to better accommodate such use cases—please feel free to share your suggestions. |
Thanks for the reply! Adjusting the spacing and pointSize did the trick. However, I noticed that setting the pointSize overrides the ChartStyle for the given graph. |
Hmm, that shouldn’t happen, @projectuniverse. Could you share your code? |
Well I pass the ProvideChartStyle function a Chart where I set the chart parameter to |
Got it. Because you’re creating a new |
Thanks a lot! |
You’re welcome! |
Hello,
I am using vico with compose and material 3. I am wondering how to scale a line chart with a large data set (about 60-720 data points on average). If I leave the chart at default settings, having hundreds of data points means scrolling endlessly. I have read through some issues, and I came across a solution to disabling horizontal scrolling using chartScrollSpec = rememberChartScrollSpec(isScrollEnabled = false). However, with hundreds of data points, this results in a graph that can't be read anymore (you cannot distinguish the data points, and the tick labels aren't shown - even though I limited the amount of ticks to 10 at max). So this brings me to my question:
Is there a way to customize the spacing between data points on the x-axis (i.e., change the default spacing)?
My goal: I would like the graph to try to show the whole dataset, even with hundreds of data points, without making the user scroll (thus, I need to change the spacing). However, the graph should also be scrollable so that when the data set is too large for it to be properly displayed, the graph is not cramped together. In case the user has to scroll, I would like to limit the amount of scrolls to a minimum.
Thanks for any help!
The text was updated successfully, but these errors were encountered: