javascript - Plotly sorting dataset -


i havent been able find documentation hoping 1 of guys might able help.

i have following chart options:

var chardata = [{         x: x,         y: y,         type: 'bar',         marker: {             color: '#3bbfb9'         },         name: $filter('translate')('competences.graph.current')     }],     layout = {         legend: {             traceorder: 'reversed'         },         margin:{             b: 200         }     }; 

where x list of names , y looks this:

[1, 13, 13, 4, 4, 4, 4, 4, 4, 4, 4, 15, 6, 7, 7, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9] 

now wish add sort functionality users can press , chart sorts (from low high)

however im not sure how this. plotly documentation doesnt state sorting data.

note if can set in chartdata configuration sorts low high helpful aswell!


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -