# Dynamic historical tags for Timeseries Chart

**URL:** <https://forum.inductiveautomation.com/t/dynamic-historical-tags-for-timeseries-chart/15575>\
**Category:** Ignition\
**Created:** [October 5, 2017, 1:18am UTC](https://forum.inductiveautomation.com/t/dynamic-historical-tags-for-timeseries-chart/15575 "2017-10-05T01:18:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cesrom](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@cesrom](https://forum.inductiveautomation.com/u/cesrom)\
**Post date:** [October 5, 2017, 1:18am UTC](https://forum.inductiveautomation.com/t/dynamic-historical-tags-for-timeseries-chart/15575/1 "2017-10-05T01:18:46Z")

</div>

I have a number of furnaces, and each has a set of historical tags configured.

I am able to dynamically pull the historical data for any given furnace’s tags by binding the **Tag Pens** on the Easy Chart component to the following SQL query:

```auto
SELECT
    UPPER(REVERSE(SUBSTRING(REVERSE([tagpath]), 0, CHARINDEX('/', REVERSE([tagpath]))))) as [NAME],
    [tag_path] AS [TAG_PATH], 
    'MinMax' AS [AGGREGATION_MODE], 
    'Default Axis' AS [AXIS], 
    1 AS [SUBPLOT], 
    1 AS [ENABLED], 
    '' AS [DASH_PATTERN], 
    1 AS [RENDER_STYLE], 
    1 AS [LINE_WEIGHT], 
    0 AS [SHAPE], 
    1 AS [FILL_SHAPE], 
    0 AS [LABELS], 
    '' AS [GROUP_NAME], 
    0 AS [DIGITAL], 
    0 AS [OVERRIDE_AUTOCOLOR], 
    0 AS [HIDDEN], 
    1 AS [USER_SELECTABLE], 
    '' AS [SORT_ORDER], 
    0 AS [USER_REMOVABLE] 
FROM [dbo].[sqlth_te] 
WHERE [retired] IS NULL 
AND UPPER([tagpath]) LIKE (SELECT UPPER ([device_path]) FROM [dbo].[tb_furnace] WHERE [sid] = ?) + '%' 
ORDER BY [NAME] ASC;

```

While this is straightforward, I have found that the Timeseries Chart or even the XY Chart on the reports must be hardcoded; I haven’t found a way to pull the _Pens_ dynamically.

I’d like to simply pass the _id_ of the furnace onto the Timeseries Chart and have that populate dynamically like I’m doing for the Easy Chart.

Is it possible?

Thanks,  
CR
