-
Notifications
You must be signed in to change notification settings - Fork 68
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
Formatter::Function
does not work on WASM backend
#66
Comments
Do you have an example of how to use this in wasm ? |
Yes, currently it would look like: Formatter::Function(js_sys::Function::new_with_args(
"arg1, arg2, arg3",
r#"return arg1 + arg2 + arg3;"#,
)) However I noticed that my PR does not make the code compatible with non-wasm targets. I think you could probably provide a |
Nice, thank you. I'll keep an eye on the update. I'm only using wasm with a leptos project. |
Hi, is there any updates on this? Currently I don't think I can provide my own function for this |
You can try out the PR referenced above. But this is not yet fixed/implemented on main. |
I'm using the PR in a leptos project, it's working great. |
Can you provide a small example? And do you know if the formatter functions work with ssr? If you don't know, I will check it myself. |
sure, i'll make a simple SSR example and post tomorrow.
it will fail without a feature flag. |
You can create e.g. an AxisLabel with
Formatter::Function
in WASM, but it will be rendered as a string with theRAW_MARK
prefix/suffix#*#*#*#
and will not be available to call from JS. Unsure how to get it to work presently.The text was updated successfully, but these errors were encountered: