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 2020/03/10 07:04:59 UTC

[GitHub] [incubator-echarts] mzvast commented on issue #11763: 柱状图不能设置间距

mzvast commented on issue #11763: 柱状图不能设置间距
URL: https://github.com/apache/incubator-echarts/issues/11763#issuecomment-596935616
 
 
   > > @0x018 一般这种业务场景,考虑数据少时和数据多时的适配。
   > > 我是采用设置`bar`的最大宽度 `barMaxWidth` ,不去固定 `barWidth` 大小。这样当数据量少时,`Bar` 不会很宽。当数据量大时,`barWidth` 会自适应大小。此时设置 `barCategoryGap` ,也不会受影响。
   > > 这样的处理方法,应该是正确的方向。毕竟图表宽度是固定的,你想 `barwidth` 和间隙固定,除非你的数据刚好平分这个图表宽度,不然数据量较多时,就会出现你说的挤在一起的现象。
   > 
   > 数据量和内容不是我能控制的,所以我就是需要同时设置 `宽度` 和 `间距`.
   > 
   > 他自带的自适应不能解决, 所以才希望能够自己指定.
   > 
   > 设置 `barMaxWidth` 或 `barMinWidth` ,一样导致 barCategoryGap 失效
   
   我跟你一样,需求是固定条宽度和间距,而echarts只能二选一:选了宽度,间距就失效
   ;选了间距宽度就失效。
   设计图:
   ![image](https://user-images.githubusercontent.com/8097465/76287820-51a22a80-62e0-11ea-9d69-e725a6a6ac81.png)
   
   实际效果
   ![image](https://user-images.githubusercontent.com/8097465/76287841-6088dd00-62e0-11ea-803c-b9cf7a91b896.png)
   
   哭兮兮😭,改不动,求大佬指教!万谢!

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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