sorting labels on xaxis in barchart

0
Hello I’m struggling with the sorting of the labels on the xaxis of a barchart in plotly (jscript) the series are based on a string  ‘yearweek’ the series are sorted on ‘yearweek’, but the labels on the  x-axis are not sorted on ‘yearweek’. In the documentation I can not find the appropriate settings of the sorting configuration. Below the used configuration settings.   {   "xaxis": {     "type": "category",     "autotypenumbers": "strict",     "title": "JaarWeeknr",     "autorange": true,     "tickangle": "-90",     "ticklabelstep": 1   },   "yaxis": {     "title": "Hoeveelheid"   } }
asked
1 answers
0

Hi Peter,

 

The solution can be found here: https://plotly.com/javascript/reference/layout/xaxis/#layout-xaxis-categoryorder 

 

For example “categoryorder”: “category ascending”,

 

Go Make It

answered