yliu-fe opened a new issue, #19359:
URL: https://github.com/apache/echarts/issues/19359

   ### What problem does this feature solve?
   
   我希望能够模仿视频网站中的动态排名来展示实证分析中各年份的结果。参照示例中的`Bar race`(动态排序柱状图 - 人均收入)进行修改。目标样式是:
   
   1. 数据名(例如示例中的国家地区名)显示在bar中居右(也就是`position: 'insideRight'`),并显示为阴文(白字)
   2. 对应数据值显示在bar右侧(`position: 'right'`),并显示为阳文(颜色同对应柱子)。
   
   请原谅,我并不是专业的开发人员,如果可以,请给我一些稍微详细一些的提示,非常感谢。
   
   ### What does the proposed API look like?
   
   
目前的修改是在`series.label`中进行的,大体上的修改类似于下面的代码框和图片。结果发现label只能有一个,这意味着似乎只能在一个位置上展示一组由`formatter`决定的字符,而不能将其拆分为两个样式。(如前面所述,我希望数据名和数据本身具有各自独立的位置和样式)
   
   
我目前的尝试是打包处理,统一将其设定在`insideRight`位置,然后通过`offset`来设置其向右便宜,但这样会导致所有字符都设置为阴文,从而使被`offset`选项甩在柱子右边的数值变成了描边的阴文(如下图所示),非常不美观,而且很难统一两段内容之间的间距。请问有什么更好的解决方案吗?
   
   ```
   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";>
   
   


-- 
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-unsubscr...@echarts.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org
For additional commands, e-mail: commits-h...@echarts.apache.org

Reply via email to