# Charts in Report Table Detail Rows - Custom Chart Script

**URL:** <https://forum.inductiveautomation.com/t/charts-in-report-table-detail-rows-custom-chart-script/98906>\
**Category:** Ignition\
**Tags:** ignition81, reporting\
**Created:** [November 21, 2024, 12:26am UTC](https://forum.inductiveautomation.com/t/charts-in-report-table-detail-rows-custom-chart-script/98906 "2024-11-21T00:26:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rdgerken](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@rdgerken](https://forum.inductiveautomation.com/u/rdgerken)\
**Post date:** [November 21, 2024, 12:26am UTC](https://forum.inductiveautomation.com/t/charts-in-report-table-detail-rows-custom-chart-script/98906/1 "2024-11-21T00:26:17Z")

</div>

I was able to successfully script nested data to show a dynamic number of charts within a table (one chart per detail row in my case). However, I would like to be able to customize the chart using the chart "edit script" feature. I can get access to the data keys in the report, but unfortunately, I don't know how to get access to the Row that I'm on in the table from within the chart script. Does anyone have any ideas or a workaround? I see there is a built-in key for "Row" but I don't know how to access that from within the chart script.

For example, I'm trying to do something like this in the chart script:

chart.setTitle(data['ChartHistory'].getValueAt(data['Row'],"TagName"))

but I get a key error for "Row". It seems all other parameters and built-in keys work just fine, but Row does not.

---

<div class="post-metadata">

**Author:** ![rdgerken](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@rdgerken](https://forum.inductiveautomation.com/u/rdgerken)\
**Post date:** [November 21, 2024, 1:31pm UTC](https://forum.inductiveautomation.com/t/charts-in-report-table-detail-rows-custom-chart-script/98906/2 "2024-11-21T13:31:19Z")

</div>

Well, my guess is, the Row key is only designed to work directly in the table scope (as the manual mentions). I wonder if because I'm trying to access the key from within the Chart script (even though the chart is located in a table row), if that "connection" back to the Row key is not available. The only workaround I've found is to use the X-Axis label bound to the dynamic Row key, and then access that value from within the chart object.

Something like this works:

```python
	plot = chart.getPlot()
	domain_axis = plot.getDomainAxis()
	if domain_axis is not None:
		Row = domain_axis.getLabel()
		chart.setTitle(data['ChartHistory'].getValueAt(int(Row)-1,"TagName"))

```

If anyone has a cleaner way of achieving this, let me know! TIA
