Adding data from a database query

TeeChart for JavaScript for the HTML5 Canvas
Post Reply
Bruce
Newbie
Newbie
Posts: 10
Joined: Wed Aug 26, 2020 12:00 am

Adding data from a database query

Post by Bruce » Wed Dec 02, 2020 9:47 am

Hi,

What is the recommended was of adding the results of a database query to a Tee.PointXY?

Thanks,

Bruce
Bruce

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

Re: Adding data from a database query

Post by Yeray » Fri Dec 04, 2020 12:38 pm

Hello,

You may want to take a look at the Database tutorial here:
https://steema.com/docs/TeeChartVCLDatabase.htm
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

Bruce
Newbie
Newbie
Posts: 10
Joined: Wed Aug 26, 2020 12:00 am

Re: Adding data from a database query

Post by Bruce » Fri Dec 04, 2020 3:15 pm

This is VCL. I'm talking about Javascript.
Bruce

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

Re: Adding data from a database query

Post by Yeray » Mon Dec 07, 2020 12:30 pm

Hello,

Ouch, excuse me.
Check the "Data Sources" section in the demos.
If you still find problem with it, please specify what format does the data have after running the query.
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

Bruce
Newbie
Newbie
Posts: 10
Joined: Wed Aug 26, 2020 12:00 am

Re: Adding data from a database query

Post by Bruce » Tue Dec 08, 2020 8:59 am

The demos do not include a database example.

I am currently using PHP to get the data, converting it to a Json array and on a row by row basis adding it to the chart. Is this the only way of doing it?
Bruce

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

Re: Adding data from a database query

Post by Yeray » Wed Dec 09, 2020 12:43 pm

Hello,

An alternative would be to convert the data to a JSON structure that can be loaded as in the From JSON example.
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

Post Reply