Best place to get started is to head over to IA university, there is a shortcut at the top of the page. Go over Ignition Scripting videos to get your feet wet. Once you watch those, come back with your first attempt with any questions.
The user manual is very helpful as well, also linked at the top of the page.
Let's start with getting the named query data into the property. The best way to do this is with a named query binding. Beside the data property, there will be a little chain link icon that when clicked on, will allow to choose between different binding types. Click on the query one, and put in your path and parameters.
EDIT: Do not put the binding on the dataSources prop but on one of the values under it, IE schedule_data.
forget the namedquery part… lets just go from dataset or pydataset to chart props datasource. That is the missing part. How to I update the Chart properties(datasource specifically) from a script. Thanks.
The easiest way, but has a little more overhead than others, is to bind the named query to the specific data source, then in that binding, add a transform. It is a button that is visible in the same popup where you configure the binding.
Use a script transform on the binding to manipulate the data as needed. Anytime the NQ binding updates, the transform will subsequently run.
For best performance, I use Phil's Integration Toolkit (3rd party module) that enables data looping in expressions along with other features. This dodges the scripting interpreter overhead.