TradingPal / react-native-highcharts

📈 Add Highcharts charts to react-native app for IOS and Android
https://github.com/TradingPal/react-native-highcharts
256 stars 158 forks source link

Implementing HighStock example #2

Closed tomerf8 closed 7 years ago

tomerf8 commented 7 years ago

I'm trying to implement the HighCharts demo at: https://jsfiddle.net/gh/get/jquery/3.1.1/highslide-software/highcharts.com/tree/master/samples/stock/demo/candlestick-and-volume/

In this example there are 2 series of data, styling is a bit different

I'm getting a blank screen

donaldmorton commented 7 years ago

Highstock module is not included by default on this module but you can make a small change to do so, you have to modify the default web template located at the this.state.initfrom react-native-ChartView.js try replacing line 103, <script src="https://code.highcharts.com/highcharts.js"></script> with <script src="http://code.highcharts.com/stock/highstock.js"></script>

tomerf8 commented 7 years ago

Thanks. It's solves the problem.

It's a bit ugly of course, but it's possible to duplicate the ChartView component and export a HighStock version.

donaldmorton commented 7 years ago

it would be a better idea to add a prop for using highstock, it could look like this: <ChartView style={{height:300}} config={conf} useHighstock={true}></ChartView>