Reporting Chart Scripting for Nested Data

I am running into an issue where I cannot pull in nested data into a timeseries chart’s configureScript to allow the chart to show custom pens. I have a script to configure the chart and it works when all dataSources are at a single level but not when nesting data. I used the scripting method outlined in Report with Scripted Nested Data to created the nested table/pen data for the desired tags. I embedding the table in a table group using the corresponding nested dataSource (which innately knows the nesting level). The problem I am encountering is that the configureScript for the chart is only able to access the top level of the nested query when using data[‘myKey’], not the nested level I desire. The method for retrieving nested query data outlined in the Ignition Manual will allow me to pull in all nested data, but does not allow me to know what which row in the parent query the chart should be pulling data from. There is a built-in parameter called “Row” that I think would allow me to know what level I should be pulling from, but I am not able to pull that dataSource into the configureScript. Has anyone had this issue and found a solution? I have a few work arounds, but those options would not be as clean or dynamic as making this method work.

1 Like