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

xAxis type:category, and categories broken? #69

Open farshidbakh opened 6 years ago

farshidbakh commented 6 years ago

Hello All,

This is when the XAxis labels are something different than time (seconds), For example when we have labels which could be anything ["jan", "feb", "march" ,...] In previous version of this code, for xAxis options we could do xAxis: { type:'category', categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],

}

and the XAxis labels would be 'Jan', 'Feb' and so on.

Does this feature still work? It seems to be broken.

Any idea?

Thanks, Farshid

farshidbakh commented 6 years ago

Just to be clear here. This symptom exists when the stock={true} is passed in as "true" to the .

GroupXTech commented 5 years ago

Solved:

chart: { zoomType: 'xy' }, xAxis: [ { categories: ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec" ], labels: { rotation: -45, style: { color: "#000" } } } ],