# PowerChart Step Data Pens

**URL:** <https://forum.inductiveautomation.com/t/powerchart-step-data-pens/76378>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [July 14, 2023, 12:43pm UTC](https://forum.inductiveautomation.com/t/powerchart-step-data-pens/76378 "2023-07-14T12:43:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Leech](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alex_leech/32/39391_2.png) [@Alex\_Leech](https://forum.inductiveautomation.com/u/Alex_Leech)\
**Post date:** [July 14, 2023, 12:43pm UTC](https://forum.inductiveautomation.com/t/powerchart-step-data-pens/76378/1 "2023-07-14T12:43:40Z")

</div>

Hi forum!

Simple one! I cant seem to find the correct setting on a powerchart to 'Step' historical Data between stored datapoints. Changing the line settings to 'CurveStep, CurveStepBefore or CurveStepAfter' Seems to just make little steps between interpolations, not the actual as stored datapoints. I need the red line, not the current yellow one! 😃

I've checked the data and can see the database has the points I want. On a separate tag, I had to set history mode to discrete to get this to work... Not really a solution for this tag though.  
Anyone got any ideas? (Really struggling even with the docs to understand whens best to use what history 😭 )

Thanks! 😃

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/5/450ba8a0632af9bd8dfb0b159c0984a4e41ee9f8.png)

Config:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/9/292c202e0bbde990dbdaac264f417b80d7e9e2b0.png)

---

<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:** [July 14, 2023, 12:48pm UTC](https://forum.inductiveautomation.com/t/powerchart-step-data-pens/76378/2 "2023-07-14T12:48:15Z")

</div>

> [@Alex\_Leech](#):
>
> history mode to discrete to get this to work... Not really a solution for this tag though.

Why not? Discrete is precisely what you seem to want. (You probably also want QueryMode=AsStored.)

Edit: Hmmm. PowerChart doesn't offer control over Query Mode. You may need to use a different chart component.

---

<div class="post-metadata">

**Author:** ![Alex\_Leech](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alex_leech/32/39391_2.png) [@Alex\_Leech](https://forum.inductiveautomation.com/u/Alex_Leech)\
**Post date:** [July 14, 2023, 1:01pm UTC](https://forum.inductiveautomation.com/t/powerchart-step-data-pens/76378/3 "2023-07-14T13:01:19Z")

</div>

> [@pturmel](#):
>
> Why not? Discrete is precisely what you seem to want.

I thought (and im questioning it now!) that discrete mode was specifically for 1 or 0 tags, i.e. booleans? If I use this for an analouge, will it just act to store data every single time it changes? or can I still add some deadband to it?  
The tag in question comes from a GC that updates its value every 10 minutes. As its repeated through a PLC, there could be some minor drift from time to time, so I didnt want it filling up the history with nonsense numbers.

> [@pturmel](#):
>
> Edit: Hmmm. PowerChart doesn't offer control over Query Mode. You may need to use a different chart component.

This was exactly what I was looking for - And also found out it doesnt have it 😕

---

<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:** [July 14, 2023, 1:20pm UTC](https://forum.inductiveautomation.com/t/powerchart-step-data-pens/76378/4 "2023-07-14T13:20:09Z")

</div>

> [@Alex\_Leech](#):
>
> that discrete mode was specifically for 1 or 0 tags, i.e. booleans?

Not just, but booleans are particularly appropriate uses of the mode. You can still have a deadband, but the fancy space-saving trend line-based storage decisions are skipped. (The analog mode delays the storage decision of a point until the next one comes in. See the docs for details.)

---

<div class="post-metadata">

**Author:** ![Alex\_Leech](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alex_leech/32/39391_2.png) [@Alex\_Leech](https://forum.inductiveautomation.com/u/Alex_Leech)\
**Post date:** [July 14, 2023, 1:33pm UTC](https://forum.inductiveautomation.com/t/powerchart-step-data-pens/76378/5 "2023-07-14T13:33:39Z")

</div>

Smashing stuff - Thanks for clarifying! 🙂

---

<div class="post-metadata">

**Author:** ![Alex\_Leech](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alex_leech/32/39391_2.png) [@Alex\_Leech](https://forum.inductiveautomation.com/u/Alex_Leech)\
**Post date:** [July 14, 2023, 2:22pm UTC](https://forum.inductiveautomation.com/t/powerchart-step-data-pens/76378/6 "2023-07-14T14:22:27Z")

</div>

Just discovered something - If you set the 'Querymode' in the sqlth\_te table to a 0, it renders the data without interpolation - Just not sure where I set this without updating the database! 🙂

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

edit: So a datatype 1 (Analogue) with querymode 0 gives steps! 😃

---

<div class="post-metadata">

**Author:** ![Ryan\_Shaw](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@Ryan\_Shaw](https://forum.inductiveautomation.com/u/Ryan_Shaw)\
**Post date:** [August 27, 2026, 4:34pm UTC](https://forum.inductiveautomation.com/t/powerchart-step-data-pens/76378/7 "2026-08-27T16:34:25Z")

</div>

Setting the tag's historical deadband style is what updates the database's querymode from 3 to 0. The default value is auto. Note that this update creates a new id in sqlth\_te. If you need previous historical data to show discretely as well, you'll need to run

`UPDATE sqlth_te`  
`SET querymode = 0`  
`WHERE tagpath = 'change-this-to-your-tagpath'`

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/4/84b9c15dcd555820a9d31c9c674d6fbdad76175f.png)
