-
Notifications
You must be signed in to change notification settings - Fork 8
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
work with Polars ? #42
Comments
Hello Yingwei, Yes, what you've described should work as the glue here is getting the data into Leptos. Once you have the I'm not familiar with Polars but now I'm thinking maybe I should be. |
Thanks, I'll try to play with that Signal<Vec>. Yingwei |
one more question: so, all x and y values should all be f64 type, right ? Thanks, |
Yes that's right. The Tick trait currently only implements for f64 and Chrono's DateTime. You can see all the implementations here: https://docs.rs/leptos-chartistry/0.2.1/leptos_chartistry/trait.Tick.html#foreign-impls It's a sealed trait and categorical / strings would need a whole bunch of work not yet done. |
I can run your sample SSR app in my local host. However, after "cargo add polars", (polars = "0.45.1" in Cargo.toml), I can't run your sample SSR app. Then I tried a simple leptos sample app from the leptos book. After adding polars, it didn't work either. there are 5 errors, all related to crossterm-0.28.1. I guess that I need to ask questions in Leptos forum. |
Can you share the full set of errors? |
Please see info below. Compiling psm v0.1.24 Caused by: --- stderr error occurred in cc-rs: Failed to find tool. Is warning: build failed, waiting for other jobs to finish... |
above info is when compiling leptos-chartistry SSR sample. when compiling basic Leptos sample from leptos book, it says: error[E0425]: cannot find function error[E0425]: cannot find function error[E0425]: cannot find function error[E0425]: cannot find function Compiling psm v0.1.24 Compiling polars-ops v0.45.1 |
Are you accidentally or unintentionally compiling Polars to wasm? If so, try compiling it only when building SSR. See in the SSR Cargo.toml there are dependencies listed like leptos-chartistry/examples/ssr/Cargo.toml Line 34 in 88a04ef
The other thing to check would be that you have clang installed. If polars works in another project then it's probably set up correctly. |
Thank you for your beautiful charts!
Does leptos-chartistry support Polars? I mean using Polars to read .csv file, then do data cleaning & transforming, then use polars_rows_iter to create a Vec, then create a Signal<Vec> to load data and create charts.
I used R/shiny in the past, but it would be cool to do the same thing in rust.
Thanks,
Yingwei
The text was updated successfully, but these errors were encountered: