react-native-highcharts icon indicating copy to clipboard operation
react-native-highcharts copied to clipboard

xAxis type:category, and categories broken?

Open farshidbakh opened this issue 7 years ago • 2 comments

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 avatar Jan 31 '18 16:01 farshidbakh

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

farshidbakh avatar Feb 01 '18 15:02 farshidbakh

Solved:

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

GroupXTech avatar Oct 21 '18 17:10 GroupXTech