开发者

Is there any way of adding an image to a bar in a chart in ExtJS via the highlight property?

I want to add an icon in the column/bar onMouseOver and was wondering if highlight already supported that. The docs say you can add whatever Sprite has available to the highlight object ( http://docs.sencha.com/ext-js/4-0/#/api/Ext.chart.series.Bar-cfg-highlight however even in the 开发者_StackOverflow中文版Sprite definition ( http://docs.sencha.com/ext-js/4-0/#/api/Ext.draw.Sprite ) there's no mention of how to do this beyond setting the type to image.

Any ideas would be greatly appreciated.

Thanks!


From the docs there doesn't seem to be an easy way of doing this. The Sprite class supports addCls and removeCls methods though, you could try setting a className to the sprite element and see whether a background image for an element with that className works. Otherwise the sprite element for the bar chart would have to be redefined into something more complex that takes images as a component.

In future, you should post over on the Sencha forums as you will get a quicker response.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜