# XY-Chart Interpolation

**URL:** <https://forum.inductiveautomation.com/t/xy-chart-interpolation/68875>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [January 21, 2023, 11:03am UTC](https://forum.inductiveautomation.com/t/xy-chart-interpolation/68875 "2023-01-21T11:03:45Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shyam](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/shyam/32/42528_2.png) [@Shyam](https://forum.inductiveautomation.com/u/Shyam)\
**Post date:** [January 21, 2023, 11:03am UTC](https://forum.inductiveautomation.com/t/xy-chart-interpolation/68875/1 "2023-01-21T11:03:45Z")

</div>

Hi,  
Is there any way to configure the XY chart as curve basis interpolation?  
I'm expecting like this

 ![bullet](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/9/997c938f5384445a6b1777794884bb55c632ca28.png)  
but I'm getting these sharp edge lines  
 ![bullet2](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/e/5ea61becaa3445448bed22bafbb5133c4fe88bf4.png)

please suggest....

---

<div class="post-metadata">

**Author:** ![Fadil\_Shaikh](https://avatars.discourse-cdn.com/v4/letter/f/46a35a/32.png) [@Fadil\_Shaikh](https://forum.inductiveautomation.com/u/Fadil_Shaikh)\
**Post date:** [January 30, 2023, 11:54pm UTC](https://forum.inductiveautomation.com/t/xy-chart-interpolation/68875/2 "2023-01-30T23:54:27Z")

</div>

Hey @Shyam

Where is the tag data coming in from? If this is tag history can you share your tag history configuration?  
Typically analog will have a better interpolated trend line compared to discrete.

**Doc:** [Analog](https://docs.inductiveautomation.com/display/DOC80/Configuring+Tag+History#:~:text=value%20was%20recorded.-,Analog,-Storage%C2%A0%2D%20The%20deadband)

---

<div class="post-metadata">

**Author:** ![Shyam](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/shyam/32/42528_2.png) [@Shyam](https://forum.inductiveautomation.com/u/Shyam)\
**Post date:** [January 31, 2023, 7:37am UTC](https://forum.inductiveautomation.com/t/xy-chart-interpolation/68875/3 "2023-01-31T07:37:29Z")

</div>

Hi @Fadil_Shaikh

Unfortunately I'm using query binding for data.  
Any other choices?

---

<div class="post-metadata">

**Author:** ![kyler.kamyszek](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@kyler.kamyszek](https://forum.inductiveautomation.com/u/kyler.kamyszek)\
**Post date:** [January 31, 2023, 2:56pm UTC](https://forum.inductiveautomation.com/t/xy-chart-interpolation/68875/4 "2023-01-31T14:56:50Z")

</div>

It looks like your query is grouping the results in the Time column by day. Can you switch it do minutes or just raw datetime? You can't really have best fit lines or interpolation when you have 3 values at the same X position in a graph (i.e. a slope of infinite)

If you can stretch out your graph, you may get the results you're looking for naturally.

---

<div class="post-metadata">

**Author:** ![Felipe\_CRM](https://avatars.discourse-cdn.com/v4/letter/f/dfb087/32.png) [@Felipe\_CRM](https://forum.inductiveautomation.com/u/Felipe_CRM)\
**Post date:** [January 31, 2023, 3:03pm UTC](https://forum.inductiveautomation.com/t/xy-chart-interpolation/68875/5 "2023-01-31T15:03:42Z")

</div>

If you can't change the query groupings, you might be able to use a script transform and do some kind of average on the day's values so you only get one point per x position.

---

<div class="post-metadata">

**Author:** ![Fadil\_Shaikh](https://avatars.discourse-cdn.com/v4/letter/f/46a35a/32.png) [@Fadil\_Shaikh](https://forum.inductiveautomation.com/u/Fadil_Shaikh)\
**Post date:** [January 31, 2023, 5:24pm UTC](https://forum.inductiveautomation.com/t/xy-chart-interpolation/68875/6 "2023-01-31T17:24:41Z")

</div>

@Shyam

You can do what @Felipe_CRM has suggested or can possibly use the Time Series component utilizing the interpolation option as covered [here.](https://docs.inductiveautomation.com/display/DOC81/Perspective+-+Time+Series+Chart#:~:text=value%3A%20string-,interpolation,-The%20type%20of) **Properties \> Plots \> Trends \> interpolation**

---

<div class="post-metadata">

**Author:** ![Shyam](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/shyam/32/42528_2.png) [@Shyam](https://forum.inductiveautomation.com/u/Shyam)\
**Post date:** [February 1, 2023, 11:03am UTC](https://forum.inductiveautomation.com/t/xy-chart-interpolation/68875/7 "2023-02-01T11:03:22Z")

</div>

@Felipe_CRM  
Actually, in my case it's mandatory to show multiple values per day (if available) so I can't use average value.

---

<div class="post-metadata">

**Author:** ![Shyam](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/shyam/32/42528_2.png) [@Shyam](https://forum.inductiveautomation.com/u/Shyam)\
**Post date:** [February 1, 2023, 11:06am UTC](https://forum.inductiveautomation.com/t/xy-chart-interpolation/68875/8 "2023-02-01T11:06:03Z")

</div>

Hey @kyler.kamyszek Thanks for the new info.

---

<div class="post-metadata">

**Author:** ![Shyam](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/shyam/32/42528_2.png) [@Shyam](https://forum.inductiveautomation.com/u/Shyam)\
**Post date:** [February 1, 2023, 11:16am UTC](https://forum.inductiveautomation.com/t/xy-chart-interpolation/68875/9 "2023-02-01T11:16:38Z")

</div>

changed my component as time series. But I'm facing issue (Initial & End values not showing properly).

 ![timeseries](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/b/fb3a7510239c8e467cec8dcc7ae3de3b2c1cd674.png)
