Draw candlestick in Envision

233 views
Skip to first unread message

Shi Yi

unread,
Oct 17, 2012, 2:45:12 AM10/17/12
to envis...@googlegroups.com
How can I draw the candlestick chart in envision?
I find the flotr2 adapter in envision. So I suppose it is possible to do anything in envision that can be done in flotr2.
Are there any existing methods that I can draw candlestick or should I write a plugin for it?
If I need to write a plugin for it myself, could you give me some guidance?
Thank you so much for you help.

Wojtek Kwiatek

unread,
Nov 21, 2012, 1:14:39 PM11/21/12
to envis...@googlegroups.com
You need to 'hack' the library a little bit. Search envision.js for line started like this: Flotr.addType(...). You would probably see there's no addType 'candles'. What I did was just copy function Flotr.addType('candles', ...) from flotr2.js to envision.js. Here is all the code you need to paste to your envision.js library: http://jsfiddle.net/zhgRM/

If everything is OK you should be able to use it like this in your envision config:
...
'lite-lines': { show: false },
candles : { show : true, candleWidth : 0.6 },
...

I hope it's not too late.

Daqian Zhang

unread,
Apr 30, 2013, 1:24:33 AM4/30/13
to envis...@googlegroups.com
can u give a more detail about this maybe a demo? i try you said  but get nothing,maybe something wrong,thanks
Reply all
Reply to author
Forward
0 new messages