PDA

View Full Version : Adding Marker Lines on ExtJS Charts



maslofer
21 Sep 2012, 12:29 PM
Hi,

I would like to make simple network diagram using the ExtJS chart. I can plot the nodes using a scatter plot type.

However, I am wondering what to do about the connections between nodes. It seems like I might be able to do that with a whole bunch of line series. However that seems like it will be quite inelegant using the store/series paradigm of ExtJS charting (it seems like I would have to create many series each containing a large number of null values).

Is there some way I can directly call line drawing operations on an ExtJS chart? Something like an onRender method where I can say drawline(x1,y1,x2,y2) repeatedly to connect all my nodes as I see fit?

Thank you!

scottmartin
21 Sep 2012, 1:05 PM
See if this would be of any help:
https://market.sencha.com/users/115/extensions/150

Scott.

maslofer
22 Sep 2012, 12:02 PM
Thanks for the response Scott and the link looks interesting, however it really isn't what I need.

I will know the position of the nodes and all I need is someway to add lines at specific coordinates to the chart.

scottmartin
22 Sep 2012, 2:22 PM
You would most likely need to access the surface directly and use surface.add() to create your lines. If you look at the code for Ext.chart.series.Line, it should provide the means.

Scott.

maslofer
22 Sep 2012, 2:49 PM
Thanks for the advice. I'll look into this approach.