Page 1 of 1

Update HTML5 Chart with Realtime Stock Quotes

Posted: Fri Mar 15, 2013 7:59 pm
by 13049545
Is there an easy way to pull data from a database and update an HTML chart with real-time stock prices tic by tic without reloading the whole page. I'm using ASP.Net and SQL server.

I did this before by using frames with server side code that generated javascript and a timer would load new points but that was super kludgy and I'm curious what the best practice is nowadays. That was about 10 years ago I did that page.

Was going to use Silverlight but it's days seem numbered.

Perhaps a javascript db query technique???

Thanks so much!



Joseph

Re: Update HTML5 Chart with Realtime Stock Quotes

Posted: Wed Mar 20, 2013 2:55 pm
by yeray
Hi Joseph,

I think calling Chart1.daw() should be enough to refresh the chart. Have you tried it?
See the realtime example in the features demo here.

Re: Update HTML5 Chart with Realtime Stock Quotes

Posted: Sat Mar 23, 2013 7:13 am
by 13049545
Hi Yeray,

Yes I did see that example and that shows how to refresh the chart and redraw real-time.

I suppose my question is how does one query a datasource real-time using html 5/javascript.

The example seems to generate it's own data and doesn't query a datasource as a stock chart would.

Thanks,
ja