Update HTML5 Chart with Realtime Stock Quotes

TeeChart for JavaScript for the HTML5 Canvas
Post Reply
jzarech
Newbie
Newbie
Posts: 58
Joined: Mon Jul 07, 2008 12:00 am

Update HTML5 Chart with Realtime Stock Quotes

Post by jzarech » Fri Mar 15, 2013 7:59 pm

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

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Update HTML5 Chart with Realtime Stock Quotes

Post by Yeray » Wed Mar 20, 2013 2:55 pm

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

jzarech
Newbie
Newbie
Posts: 58
Joined: Mon Jul 07, 2008 12:00 am

Re: Update HTML5 Chart with Realtime Stock Quotes

Post by jzarech » Sat Mar 23, 2013 7:13 am

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

Post Reply