You must be logged in to post your query.
Home › Forums › Chart Support › Trying to implement canvaschart to my react native app , giving error
Tagged: Document not found, react native
Here is my code :
import * as CanvasJSReact from '../../lib/canvasjs.react'; //var CanvasJSReact = require('./canvasjs.react'); var CanvasJS = CanvasJSReact.CanvasJS; var CanvasJSChart = CanvasJSReact.CanvasJSChart;
And using it into return function :
render() { const options = { title: { text: "Basic Column Chart in React" }, data: [{ type: "column", dataPoints: [ { label: "Apple", y: 10 }, { label: "Orange", y: 15 }, { label: "Banana", y: 25 }, { label: "Mango", y: 30 }, { label: "Grape", y: 28 } ] }] } return ( <View> <ScrollView> <CanvasJSChart options = {options} /> </ScrollView> </View> ); }
Its giving me error : Can’t find variable : document
Here is the screenshot :
Let me know what can i do to fix it.
Thanks
Hi Any body there , who can help me with it ?
@deepaks,
Can you kindly create sample project reproducing the issue you are facing and share it with us over Google-Drive or Onedrive so that we can look into the code, run it locally at our end to understand the scenario better and help you resolve?
— Vishwas R Team CanvasJS
You must be logged in to reply to this topic. Login/Register