Page 1 of 1

AJAX updating a graphical display

Posted: Tue Oct 05, 2010 8:14 am
by hfq
We are looking for advice about the best means of producing a real time display of x,y data from a laser scanner. The refresh rate of the display should be as many frames per second as determined supportable by the network, hopefully no less than 4 fps. We are using AJAX on the mod5270 end and can update simple HTML pages at reasonable speeds but need the HTML to display a graphic of about 512x512. Options include SVG, SWISH, Flex, creating a BMP on the fly in the mod5270, and hopefully others.

If anyone has any suggestions, we welcome them.

Thanks

Re: AJAX updating a graphical display

Posted: Wed Oct 06, 2010 9:18 am
by tod
What is the size of the data 512x512X ? - is this b/w, 8bit, 16bit 32 bit?

I know there's a demo app on the wiki for doing Flex, but you might have a data transfer problem depending on the data size.

Re: AJAX updating a graphical display

Posted: Thu Oct 07, 2010 8:44 am
by hfq
The data will be a set of about 100 pairs of int or single. 1 bit graphic format (2 colors) would be sufficient as we currently only need two colors although 8 bit is more likely the minimum. The display is a scattergram with x and y axes.

Re: AJAX updating a graphical display

Posted: Thu Oct 07, 2010 3:50 pm
by BillC
Hi, I dont kow if this will be fast enough for your needs, its a Flash component - "Open flash Chart" see http://teethgrinder.co.uk/open-flash-chart-2/

I use it here with Ajax upates every minute - http://www.fwnp.co.uk/control.php. In my case my netburner code updates a PHP website every minute and this provides the HTML page with the chart and data, it should be easy enough to code the netburner to provide the JSON data and send the chart.

I hope it helps, good luck, Bill

Re: AJAX updating a graphical display

Posted: Thu Oct 07, 2010 4:25 pm
by tod
Given the small size of the data I would say you want to pass back the data (not a bmp) and let the browser create the display. There are many Javascript charting tools out there but I haven't used any. There are also a slew of Java applet charting tools. If you've never passed JSON data from the NB to the browser check out the Ajax wiki article, focus on the Ajax II sample.