PDA

View Full Version : rabbitMQ data feed and extjs chart integration



Pete_C
26 May 2013, 10:55 AM
Hello,

I wonder if anyone can help. I'm looking at potentially taking a data stream published via rabbitMQ (python pika, if this is useful) and would like to use extjs to chart the data live. Has anyone any examples or pointers where to look for further documentation or advice ?

Many thanks
Pete

slemmon
28 May 2013, 11:45 AM
I've not seen folks posting on rabbitMQ, but if you can get it delivering JSON datasets you should be all set with ExtJS charts.

Pete_C
28 May 2013, 2:16 PM
Many thanks for your reply. After reading more I suspect that you're absolutely correct. I can grab the feed, create a dictionary from the contents and turn it into a jason file for graphing.

I'm initially looking at something fairly simple, charting quota usage. Clearly this would be good to trend with time and I'm having a play with this now. Is there a way of appending fresh data to an existing chart (a la rrdtool), if so I suspect I can figure the time scales according to taste.

Apologies for the simplistic approach, first time out with extjs, and thanks again for the rapid response. Much appreciated.
Pete

slemmon
28 May 2013, 4:47 PM
I believe the method you'll want to use is on the chart's store: loadData (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.data.Store-method-loadData)(). The first param is the data you want to pass to the store (following the fields set up either on the store or its model) and the second, optional, param is whether you want to append the data to the store's existing recordset or not (-vs- overriding the data in the store).

Pete_C
29 May 2013, 12:47 AM
Slemmon,

Once again many thanks for answering a beginners question, it's much appreciated. I think I've get a rough template up and doing the right thing(tm).

Pete