# Reporting - Dynamic Historical Tags

**URL:** <https://forum.inductiveautomation.com/t/reporting-dynamic-historical-tags/18435>\
**Category:** Ignition\
**Tags:** ignition79, database, scripting\
**Created:** [June 13, 2018, 12:40am UTC](https://forum.inductiveautomation.com/t/reporting-dynamic-historical-tags/18435 "2018-06-13T00:40:36Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![tordvd](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tordvd/32/11525_2.png) [@tordvd](https://forum.inductiveautomation.com/u/tordvd)\
**Post date:** [March 18, 2021, 8:33am UTC](https://forum.inductiveautomation.com/t/reporting-dynamic-historical-tags/18435/7 "2021-03-18T08:33:41Z")

</div>

This will create a dynamic timeseries chart, given that all possible pens are pre-defined. (legend items for pens not used will be hidden):

> [@Dynamic report chart, legend not hiding unused pens](http://forum.inductiveautomation.com/t/dynamic-report-chart-legend-not-hiding-unused-pens/44565/3):
>
> Thank you this worked! The reporting timeseries chart can now support a dynamic dataset. A short how to for the next guy: Define the maximum amount of pens your chart will have. Edit the chart-script according to the code below. Populate your chart like you normally do. Just make sure that your pen labels for the chart are the same as your dataset(datasource) column labels. This is used to match which labels to hide. See screenshot below: Code for hiding legend items not used: f…

---

_[View the full topic](https://forum.inductiveautomation.com/t/reporting-dynamic-historical-tags/18435)._
