echarts-bot[bot] commented on issue #19359:
URL: https://github.com/apache/echarts/issues/19359#issuecomment-1838602276
@yliu-fe It seems you are not using English, I've helped translate the
content automatically. To make your issue understood by more people and get
helped, we'd like to suggest using English next time. 🤗
<details><summary><b>TRANSLATED</b></summary><br>
**TITLE**
[Feature] Implement the display of data keys (e.g., city names) in the
column in the dynamic sorting histogram and the numeric value on the right side
of the column.
**BODY**
### What problem does this feature solve?
I wanted to be able to mimic the dynamic rankings in video sites to show the
results of each year in the empirical analysis. Refer to the 'Bar race' in the
example (Dynamic Sort Histogram - Per Capita Income). The target styles are:
1. The data name (e.g. the country name in the example) is displayed on the
right side of the bar (i.e. 'position: 'insideRight''') and is displayed in
black (white)
2. The corresponding data value is displayed on the right side of the bar
('position: 'right'') and is displayed in yang (the color is the same as the
corresponding bar).
Please forgive me, I'm not a professional developer, if you can, please give
me some tips in a little more detail, thank you very much.
### What does the proposed API look like?
The current changes are made in 'series.label', and are generally similar to
the code box and images below. It turned out that there can only be one label,
which means that it seems that only a set of characters determined by
'formatter' can be displayed in one place, and it cannot be split into two
styles. (As mentioned earlier, I want the data name and the data itself to have
their own independent positions and styles)
My current attempt is to wrap it up, set it to the 'insideRight' position,
and then set it to be cheap to the right with 'offset', but this will cause all
characters to be set to yin, so that the value that was thrown to the right of
the column by the 'offset' option becomes the stroke of the yin (as shown in
the image below), which is very unsightly, and it is difficult to unify the
spacing between the two paragraphs. Is there any better solution, please?
```
label: {
show: true,
precision: 1,
position: 'insideRight',
valueAnimation: true,
fontFamily: 'Arial',
offset: [60,0],
fontSize: 16,
formatter: "{b} {@0}"
}
```
<img width="1243" alt="image"
src="https://github.com/apache/echarts/assets/34157793/b338432d-5df9-4e6c-ab3e-3de8dfdb34dc">
</details>
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]