You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/07/19 12:45:39 UTC
[GitHub] [echarts] dovydasrudys commented on issue #17130: [Bug] 热力图不能同时根据x,y轴的值排序吗?heatmap can not be sorted based on the x-axis and y-axis
dovydasrudys commented on issue #17130:
URL: https://github.com/apache/echarts/issues/17130#issuecomment-1189008863
You are asking echarts to make a dataset for you which is first sorted by "Age" dimension, and if the "Age" dimension is equal only then sort it by "Pclass" which then goes like that:
| Position | Age | Pclass |
|-------------------------|
| 1 | 0.83 | 2 | <---- Lowest Age
| 2 | 1 | 2 | <---- Age higher than previous
| 3 | 54 | 1 | <---- Age higher than previous
| 4 | 55 | 1 | <---- Age higher than previous
| 5 | 70.5 | 3 | <---- Age higher than previous
| 6 | 74 | 3 | <---- Age higher than previous
So, essentially you are sorting only by Age. In order to achieve your expected result you want your transform to look like this:
```
"transform": {
"type": "sort",
"config": [
{
"dimension": "Pclass",
"order": "asc"
},
{
"dimension": "Age",
"order": "desc"
},
]
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org