Echarts has a problem with data.

  node.js, question

图片描述

I would like to exchange the sales amount on the Y X axis and the name on the y axis. this is very simple. I will start with the two numbers and then OK
2 Not only the YX axis is exchanged, but also the data is changed. The name of the person who sells the most money comes first, and so on. How does this place do it

I think this data structure should be the following, directly sort, arrange the order before operating the data, otherwise what do you want to do? The vertical axis is drawn from bottom to top, and the horizontal axis is drawn from left to right.

data = [{
 name: 'tom',
 sale: 1234
 },{
 name: 'dev',
 sale: 2345
 }]