Re: [I] 堆叠柱状图 实现每一小部分面积相同 [echarts]

2024-02-03 Thread via GitHub


guoliuqing123 closed issue #19591: 堆叠柱状图 实现每一小部分面积相同
URL: https://github.com/apache/echarts/issues/19591


-- 
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

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



[I] 堆叠柱状图 实现每一小部分面积相同 [echarts]

2024-02-03 Thread via GitHub


guoliuqing123 opened a new issue, #19591:
URL: https://github.com/apache/echarts/issues/19591

   ### Version
   
   无
   
   ### Link to Minimal Reproduction
   
   无
   
   ### Steps to Reproduce
   
   var data = [
   [
   "甚高频地空通信系统",
   "语音通信交换系统",
   "一/二次监视雷达",
   "场面监视雷达",
   "空管自动化系统"
   ],
   [
   "4",
   "12",
   "0",
   "9",
   "16"
   ],
   [
   "1",
   "2",
   "0",
   "4",
   "1"
   ],
   [
   "3",
   "2",
   "1",
   "1",
   "0"
   ]
   ]
   
   
option = {
   tooltip: {
 // trigger: 'axis',
 formatter: '{b} : {c}%'
   },
   angleAxis: [  // 是否显示y轴
 {
   show: true,
   type: 'category',
   data: data[0],
   axisTick: {
 show: false, //刻度不显示
   },
   axisLabel: {
 show: true,
 color: '#7591C8',
 formatter(params) { //添加换行符
   let newstr = '';
   for (let i = 0; i < params.length; i++) {
 newstr += params[i];
 if ((i + 1) % 7 == 0) newstr += '\n';
   }
   return newstr;
 },
   },
   splitLine: {
 show: false,
   },
   axisLine: {//坐标 轴线
 show: false, //是否显示坐标轴轴线
   },
 },
   ],
   radiusAxis: [{
 show: false, // 是否显示x轴
   }],
   polar: {
 radius: [30, '75%'], // 第一项是内半径,第二项是外半径
 center: ['50%', '48%'], // 极坐标系的中心(圆心)坐标,数组的第一项是横坐标,第二项是纵坐标。
   },
   series: [
 {
   type: 'bar',
   data: data[1],
   coordinateSystem: 'polar',
   name: '初级',
   stack: 'a',
   emphasis: {
 focus: 'series'
   },
   barCategoryGap: '1%', //同一系列的柱间距离,默认为类目间距的20%,可设固定值
   itemStyle: {
 color: '#64A7EB',
 borderColor: '#fff'
   }
 },
 {
   type: 'bar',
   data: data[2],
   coordinateSystem: 'polar',
   name: '中级',
   stack: 'a',
   emphasis: {
 focus: 'series'
   },
   barCategoryGap: '1%',
   itemStyle: {
 color: '#60D8AC',
 borderColor: '#fff'
   }
 },
 {
   type: 'bar',
   data: data[3],
   coordinateSystem: 'polar',
   name: '高级',
   stack: 'a',
   emphasis: {
 focus: 'series'
   },
   barCategoryGap: '1%',
   itemStyle: {
 color: '#7591C8',
 borderColor: '#fff'
   }
 }
   ],
 };
   
   ### Current Behavior
   
   堆叠柱状图 想要实现实现每一小部分(绿色、蓝色、深蓝色组成的)面积相同,看起来更加美观
   
![QQ截图20240204095008](https://github.com/apache/echarts/assets/105954867/e6d89d02-850b-414b-952a-34add9183fdd)
   
   
   ### Expected Behavior
   
   堆叠柱状图 想要实现实现每一小部分(绿色、蓝色、深蓝色组成的)面积相同,看起来更加美观
   
   ### Environment
   
   ```markdown
   - OS:
   - Browser:
   - Framework:
   ```
   
   
   ### Any additional comments?
   
   _No response_


-- 
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