# \[BUG?\] Perspective Power Chart Bug - Embr-Chart as a Replacement?

**URL:** <https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 10, 2025, 5:42am UTC](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084 "2025-02-10T05:42:11Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [February 16, 2025, 7:33pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084/41 "2025-02-16T19:33:39Z")

</div>

> [@bmusson](#):
>
> I'll evaluate this scale for inclusion in the module.

> [@Musson Industrial’s Embr-Charts Module](https://forum.inductiveautomation.com/t/musson-industrial-s-embr-charts-module/91618/110):
>
> Version 2.0.2 is out, and includes the timestack scale. play_button Demo View

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [February 21, 2025, 8:42pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084/42 "2025-02-21T20:42:43Z")

</div>

Expanding more on the logic of loading everything in around the user's currently zoomed/panned window, how much data would be considered appropriate to keep stored as the user is panning along the time axis?

With things like pturmel's `pageVarMap` we can technically store more data that is actually being provided to the chart. But then that gets into the problem of if the user is jumping around the time span, you end up with holes in the data, and need to reprocess it to fill in the missing holes.

How big of a window would you expect as a user to be able to view?  
@nminchin How much data does the software you were showing in the post below retain?

> [@\[FEATURE\] Increase usability of the Perspective Power Chart component](https://forum.inductiveautomation.com/t/feature-increase-usability-of-the-perspective-power-chart-component/51474/65):
>

Is it just storing data since the user opens the trend? Does it reach a point where it starts dumping data off the end?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 21, 2025, 8:57pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084/43 "2025-02-21T20:57:37Z")

</div>

When not displaying the trend, the UI queries only when told to, and holds just that data. When displaying the trend, it also queries when the time span is changed, and holds just the data in that new time span. The held data is not discarded until after the new query completes, to minimize chart dead time.

(If selecting tags in the tag list, only those tags are queried for the given time span.)

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [February 26, 2025, 4:03pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084/44 "2025-02-26T16:03:53Z")

</div>

What would you consider a 'reasonable' data point density for various windows of time? (ie 1 hour, 1 day, 1 week).

For 1 hour, 5 second intervals or tighter seems reasonable but anything beyond a few hours and that becomes very heavy very fast with multiple tags.

Running a higher density in a span gives you the benefit of not needing to re-query every time you zoom in, but also adds overhead/increases load time as you have to deal with all that extra data.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 26, 2025, 4:06pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084/45 "2025-02-26T16:06:13Z")

</div>

I find it reasonable to expect somewhere between 1,000 data points and 10,000 data points on any given chart.

---

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [February 26, 2025, 4:50pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084/46 "2025-02-26T16:50:31Z")

</div>

It all depends on the underlying data source and what information you’re trying to convey 🤷🏻‍♂️

But yeah, from a performance standpoint, points per chart is more meaningful than points per time.

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [March 4, 2025, 10:46pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084/47 "2025-03-04T22:46:16Z")

</div>

Put something together based on what we are doing internally and the examples of better trend viewers from various posts

 ![trendSurfer](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/3/83c9cb9f1451b6782c83e72ca4de72fd1e7d4079.jpeg)

It has basic pan and zoom functionality, I haven't taken a stab at the axis dragging to adjust bounds yet.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 4, 2025, 10:58pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084/48 "2025-03-04T22:58:29Z")

</div>

Looking good!

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [March 4, 2025, 10:59pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084/49 "2025-03-04T22:59:13Z")

</div>

The axis divisions even make sense! 😆

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 4, 2025, 11:00pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084/50 "2025-03-04T23:00:54Z")

</div>

I was a bit sad that I didn't see progressions like `17:27:12`...`17:31:56`...`17:36:12` though 🤣  
Maybe you can add a "disgruntled employee" option?

---

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [March 4, 2025, 11:04pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084/51 "2025-03-04T23:04:15Z")

</div>

Impressive, the tooltips look great.

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [March 4, 2025, 11:06pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084/52 "2025-03-04T23:06:47Z")

</div>

> [@nminchin](#):
>
> Maybe you can add a "disgruntled employee" option?

runs `sudo rm -rf /*` at a randomly chosen time.

> [@bmusson](#):
>
> tooltips

I think those have my largest inline defined function yet (~200 lines), and it will probably get larger as I add more handling.

Lightly related, what color do you normally use for the x-trace line? I'm noticing that gray gets lost easily with multiple pens.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 4, 2025, 11:13pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084/53 "2025-03-04T23:13:38Z")

</div>

> [@ryan.white](#):
>
> Lightly related, what color do you normally use for the x-trace line? I'm noticing that gray gets lost easily with multiple pens.

In this example from another SCADA I saw while googling, it's hot pink 😅 You can definitely see it... Or maybe this is an annotation marker?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/7/0728f7d11ec62043b5c5691c50ef378bb448fc82.jpeg)

I think it's black in Citect's ProcessAnalyst, and it does get a bit lost at times

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 4, 2025, 11:18pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084/54 "2025-03-04T23:18:08Z")

</div>

> [@bmusson](#):
>
> the tooltips look great.

I agree, it'd be nice to have the units in them as well to give context. Despite having the pens on engunits axes, it can still get confusing and means you have to look away to check the axis label. It becomes even more confusing if you have all the axes on the same plot

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [March 4, 2025, 11:21pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084/55 "2025-03-04T23:21:53Z")

</div>

> [@nminchin](#):
>
> units in them

I'll add that to my list. It's going to be interesting because I don't think I have the units actually specified anywhere other than the scales.

I already touch those while building the tooltips so not hard to grab the units if they exist there. But then you get into issues with multiple eng units on one scale.

The other option would be to include the units in the definition of the dataset for the tag. (I'd probably go with this)

I'm already looking at making a tag browser/selector to go with this chart so I could probably have that grab the tag's units and stuff it in the dataset definition.

You think I should right align the numeric values while I'm at it? If I'm grabbing units I can grab/define formats as well.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 4, 2025, 11:27pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084/56 "2025-03-04T23:27:22Z")

</div>

> [@ryan.white](#):
>
> You think I should right align the numeric values while I'm at it?

I think so.

Couple of other things while you're reading in the engunits 😬  
Can you read in the displ... you beat me to it

> [@ryan.white](#):
>
> If I'm grabbing units I can grab/define formats as well.

Edit: I forgot the 2nd of the couple. Is it hard to centre the date to the gridline? I think it looks a bit funny to the left 🤔

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [March 4, 2025, 11:30pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084/57 "2025-03-04T23:30:58Z")

</div>

> [@nminchin](#):
>
> centre the date

Ah, that's being done because if you have it centered, it chops off chunks of the chart of varying size off the right of the last tick. Its a weird chartjs thing.

 ![trendChopped](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/5/85bb687866690e672fa30d524d7a4c21a70e3b93.png)  
Note the white space to the right of the last tick that isn't present in the screenshot in my earlier post.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 4, 2025, 11:34pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084/58 "2025-03-04T23:34:06Z")

</div>

Hmm, I don't think that looks tooo bad. Citect would truncate the datetime string:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/e/0ef6ae59d75d4549658be9ad4ca710a6883e20b9.jpeg)

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [March 4, 2025, 11:35pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084/59 "2025-03-04T23:35:19Z")

</div>

My issue is that the amount of space varies depending on how close the tick is to the right side of the chart. So while you are panning you are getting a lot of axis thrash, at least with display. It doesn't affect the panning movement itself.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 4, 2025, 11:36pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084/60 "2025-03-04T23:36:17Z")

</div>

Ah ok, that's not ideal. ~~Left~~ Right-aligned (and left-positioned) it is!

[Previous page](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084.md?page=2)

[Next page](https://forum.inductiveautomation.com/t/bug-perspective-power-chart-bug-embr-chart-as-a-replacement/102084.md?page=4)
