Question: react-native-plotly library
narduzzi opened this issue · 1 comments
narduzzi commented
Hello,
I'm new to Vue Native and I'm trying to use the Plotly.js library for react-native with expo.
However, I can't find a way to display the graph.
My question is :
- is this library supported ? I don't have compilation errors.
- How can I use the Plotly component from react-native?
My code is the following :
<template>
<nb-container>
<nb-content>
<nb-h2>Top text</nb-h2>
<view>
<plotly data="somedata"></plotly>
</view >
<nb-h3>Bottom Text</nb-h3>
</nb-content>
</nb-container>
</template>
<script>
import Plotly from 'react-native-plotly';
export default {
data: {
somedata: {"x":[1, 2], "y": [1, 2]},
},
components: {
plotly: Plotly
},
mounted:function () {
console.log("mounted")
}
}
</script>
<style>
</style>
Thanks for your help!
narduzzi commented
Solution : the view
holding the plotly graph needs to have a height.