highcharts / highcharts/highcharts-react-native
Unable to pass actual javascript objects to `data`
- Dominant language
- JavaScript
- Stars
- 105
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
Description
### When trying to render a tooltip, the `data` API option led me down a rabbit hole into the darkest depths of Mordor.
To render useful info in a tooltip, I need to access information living in my RN code from within the webview. "Ah, the `data` option looks promising," I said to myself. Boy, was I wrong.
Passing a string worked fine but this doesn't help me because, ultimately, I need to pass an array of objects. But, passing a data object simply gives you `[object Object]` when trying to reference `data` or `window.data` within some helper functions inside of Highchart's webview.
- "Well, if a normal string works, using `JSON.parse(data)` should work, as well!" Doing so prevented the webview from rendering anything at all. Huh?
- I tried passing `data={JSON.stringify({ foo: "bar" })}` into `` and that also prevented the webview from rendering.
- I fudged with `HighchartsReactNative.js:108` to no avail.
Finally, I asked myself "What gives?", and submitted this issue.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.