简体   繁体   English

ExtJS 4的堆积和分组图表

[英]Stacked and Grouped Chart with ExtJS 4

I'm trying to convert from Fusion Charts to the builtin ExtJS 4 charts and I can't find a way to create a Stacked and Grouped Chart . 我正在尝试从Fusion Charts转换为内置的ExtJS 4图表,我找不到创建Stacked和Grouped Chart的方法 Has anyone been successful getting this to work with ExtJS 4? 有没有人成功地使用ExtJS 4?

It doesn't look like this is possible with the bundled charting in ExtJS. ExtJS中的捆绑图表看起来不太可能。 I'd recommend High Charts or Fusion Charts. 我推荐High Charts或Fusion Charts。

I found the solution, You should add the second bar series and for each use render handler like this: 我找到了解决方案,你应该添加第二个bar系列,并为每个使用渲染处理程序,如下所示:

renderer: function(sprite, config, rendererData, index){ var w = config.width;
config.width = 30;
config.x = config.x + (w-30)/2 - 20; <--- -20 for first bar and + 20 for second

}

Source : 来源

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM