# \[Bug 15520\] OPC-HDA Data in a Perspective Chart

**URL:** <https://forum.inductiveautomation.com/t/bug-15520-opc-hda-data-in-a-perspective-chart/34317>\
**Category:** Ignition Early Access\
**Created:** [April 29, 2020, 10:36pm UTC](https://forum.inductiveautomation.com/t/bug-15520-opc-hda-data-in-a-perspective-chart/34317 "2020-04-29T22:36:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tbthomps](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@Tbthomps](https://forum.inductiveautomation.com/u/Tbthomps)\
**Post date:** [April 29, 2020, 10:36pm UTC](https://forum.inductiveautomation.com/t/bug-15520-opc-hda-data-in-a-perspective-chart/34317/1 "2020-04-29T22:36:21Z")

</div>

I’m trying to pull data out of a PI historical system to use in a perspective Time Series or XY Chart. I’m having a hard time getting it cooperate since I can’t browse the HDA sources under the tag history tab on the bindings.

What I did manage to do was make use the system.tag.queryTagHistory command with the HDA provider and got a dataset back that was like 500 rows and 2 columns (Timestamp and value great news!). I thought I was off to a good start so I built a generic script you feed the PI tag path back and it pulls the history into a dataset.

Then I went to bind this to the time series chart and was met with an error…The dataset pulls in correctly but I was met with a blank chart and my dataset example object was changed into a value:Dataset[2108x2]. So now my question is: How do you bind datasets to play nicely with the new perspective charts?

Can I also request a feature to add HDA browsing back to the Tag History binding like in vision?

![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/8aa5ffa1c3f099c1a1c71b981fdea7ed99636dfd.png)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/f/f99c5dad091290dbbd4b0a72a6cdcc5879e36996.png)

---

<div class="post-metadata">

**Author:** ![Matthew.gaitan](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Matthew.gaitan](https://forum.inductiveautomation.com/u/Matthew.gaitan)\
**Post date:** [April 30, 2020, 3:13pm UTC](https://forum.inductiveautomation.com/t/bug-15520-opc-hda-data-in-a-perspective-chart/34317/2 "2020-04-30T15:13:37Z")

</div>

You need to change the xAxes, yAxes, and series props to match your incoming data

---

<div class="post-metadata">

**Author:** ![jeffcd](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@jeffcd](https://forum.inductiveautomation.com/u/jeffcd)\
**Post date:** [May 9, 2020, 4:08pm UTC](https://forum.inductiveautomation.com/t/bug-15520-opc-hda-data-in-a-perspective-chart/34317/3 "2020-05-09T16:08:37Z")

</div>

Hi @Tbthomps, I was wondering if you were able to make this work?

I’m working on the exact same issue right now… existing GE Proficy Historian connected via OPC-HDA, but I’m also struggling to bring this data into Perspective.

I second the request to add an OPC-HDA browsing feature into Perspective!

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 11, 2020, 3:04pm UTC](https://forum.inductiveautomation.com/t/bug-15520-opc-hda-data-in-a-perspective-chart/34317/4 "2020-05-11T15:04:52Z")

</div>

> [@jeffcd](#):
>
> I second the request to add an OPC-HDA browsing feature into Perspective!

It's on the list - probably fairly soon.

---

<div class="post-metadata">

**Author:** ![jeffcd](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@jeffcd](https://forum.inductiveautomation.com/u/jeffcd)\
**Post date:** [May 11, 2020, 3:40pm UTC](https://forum.inductiveautomation.com/t/bug-15520-opc-hda-data-in-a-perspective-chart/34317/5 "2020-05-11T15:40:08Z")

</div>

To help anyone in future, I solved my issue, although I’m not sure if this is the same issue @Tbthomps had above.

I was also able to bind an OPC-HDA historical tag dataset to the time-series chart and when previewing the dataset it displayed all the correct time stamps and values, but the chart was still blank (I double checked my chart config multiple times).

I finally found the issue was the dataset header name for the tag value column. The OPC-HDA server tags contained “.” (periods) in the tagname. Apparently Ignition datasets don’t like this. I added some script to change any “.” to “\_” and the chart showed up immediately.

Here’s an example of the script:

```auto
    endTime = system.date.now()
	startTime = system.date.addMinutes(endTime, -1)
	dataSet = system.tag.queryTagHistory(paths=['[Matrikon]Random.Real4'], startDate=startTime, endDate=endTime, returnSize=1, aggregationMode="Maximum", returnFormat='Wide')
	
	headersIn = system.dataset.getColumnHeaders(dataSet)	#get all column headers
	headersOut = [h.replace('.', '_') for h in headersIn]	#look through headers and replace "." with "_"
	
	datasetOut = system.tag.queryTagHistory(paths=['[Matrikon]Random.Real4'],columnNames=headersOut, startDate=startTime, endDate=endTime, returnSize=-1, aggregationMode="Maximum", returnFormat='Wide')
	return datasetOut

```

---

<div class="post-metadata">

**Author:** ![Tbthomps](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@Tbthomps](https://forum.inductiveautomation.com/u/Tbthomps)\
**Post date:** [May 11, 2020, 3:56pm UTC](https://forum.inductiveautomation.com/t/bug-15520-opc-hda-data-in-a-perspective-chart/34317/6 "2020-05-11T15:56:45Z")

</div>

Thank you Jeffcd, I bet I run into the same problem as my tag names do have a “.” in them. Thanks for the script!!!

---

<div class="post-metadata">

**Author:** ![john.glynn](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/john.glynn/32/17348_2.png) [@john.glynn](https://forum.inductiveautomation.com/u/john.glynn)\
**Post date:** [June 17, 2020, 10:28pm UTC](https://forum.inductiveautomation.com/t/bug-15520-opc-hda-data-in-a-perspective-chart/34317/7 "2020-06-17T22:28:12Z")

</div>

Hi @paul-griffith, I’ve run into this problem, and while looking through the forums I’ve found a few other posts dealing with this specific topic of browsing historical tags in perspective.

You’ve said it’s on the shortlist but I was wondering if it would be beneficial or useful to put it up on the Ignition Features and Ideas page, or not because it’s already on the ‘shortlist.’

Thank you

---

<div class="post-metadata">

**Author:** ![Jim\_Lang](https://avatars.discourse-cdn.com/v4/letter/j/e47c2d/32.png) [@Jim\_Lang](https://forum.inductiveautomation.com/u/Jim_Lang)\
**Post date:** [November 27, 2024, 1:56am UTC](https://forum.inductiveautomation.com/t/bug-15520-opc-hda-data-in-a-perspective-chart/34317/8 "2024-11-27T01:56:31Z")

</div>

Thank you, Jeff. I, too, had this same problem and had no idea the cause. Saved me a lot of time.
