# XY Chart adding in a USL and LSL

**URL:** <https://forum.inductiveautomation.com/t/xy-chart-adding-in-a-usl-and-lsl/81194>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 30, 2023, 7:35pm UTC](https://forum.inductiveautomation.com/t/xy-chart-adding-in-a-usl-and-lsl/81194 "2023-10-30T19:35:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve\_Coughlin](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@Steve\_Coughlin](https://forum.inductiveautomation.com/u/Steve_Coughlin)\
**Post date:** [October 30, 2023, 7:35pm UTC](https://forum.inductiveautomation.com/t/xy-chart-adding-in-a-usl-and-lsl/81194/1 "2023-10-30T19:35:15Z")

</div>

I am attempting to add in a static USL and LSL value into an XY chart. I can't figure out how to overlay the USL/LSL value onto the existing series of data, it seems to add the value in as a totally separate series of data.

 ![SPC_USL_1](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/d/dd23b2f4b1e864c01523145df7b32d05463db299.png)  
 ![SPC_USL_2](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/f/ef404015775e1f4f8ce64a0f87b52e321b97af3e.png)

Any help is appreciated. Thanks!

---

<div class="post-metadata">

**Author:** ![Tim\_Carlton](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim_carlton/32/52835_2.png) [@Tim\_Carlton](https://forum.inductiveautomation.com/u/Tim_Carlton)\
**Post date:** [October 30, 2023, 7:58pm UTC](https://forum.inductiveautomation.com/t/xy-chart-adding-in-a-usl-and-lsl/81194/2 "2023-10-30T19:58:55Z")

</div>

Posting code is more useful than screen shots, though sometimes both code and screenshots are helpful.

That said, from what I can see:

- you have one plot
- you have two series (lines drawn based on x,y data) on that plot
- you have two axis on the plot. Both are on the left.
- 
  - the first series (series[0]) is plotted against axis[0]

- 
  - the second series (series[1]) is plotted against axis[1]

From your description, what you want is probably

- one plot
- three series (measurement, USL, LSL)
- one axis, with all three series plotted against the same axis (axis[0])

You have explicitly instructed Perspective to plot series[1] on axis[1] by selecting USL as the yAxis.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/7/57cd74a6eea2330a204d6d96a235e1173a77935a.png)

Change that to `yAxis: default` (or whatever you named axis[0]) and see if that is what you were expecting.

---

<div class="post-metadata">

**Author:** ![Steve\_Coughlin](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@Steve\_Coughlin](https://forum.inductiveautomation.com/u/Steve_Coughlin)\
**Post date:** [October 30, 2023, 8:05pm UTC](https://forum.inductiveautomation.com/t/xy-chart-adding-in-a-usl-and-lsl/81194/3 "2023-10-30T20:05:09Z")

</div>

Hi Tim,

Forgot to mention that this data is being pulled from a SQL query, so there's no code used.

 ![png_Igni_q](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/9/69a974cadf896fc495eb841aaf30c5ba95bc3ac7.png)

You were correct though, I hadn't set the yAxis to share the same yAxis as my other data, ugh. Thanks!!!

---

<div class="post-metadata">

**Author:** ![Tim\_Carlton](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim_carlton/32/52835_2.png) [@Tim\_Carlton](https://forum.inductiveautomation.com/u/Tim_Carlton)\
**Post date:** [October 30, 2023, 8:08pm UTC](https://forum.inductiveautomation.com/t/xy-chart-adding-in-a-usl-and-lsl/81194/4 "2023-10-30T20:08:59Z")

</div>

> [@Steve\_Coughlin](#):
>
> Forgot to mention that this data is being pulled from a SQL query, so there's no code used

For future reference, right click on the chart and `copy`. That will serialize the chart properties as JSON. Paste them here in an expandable section (search the internet for "expandable section markdown").

---

<div class="post-metadata">

**Author:** ![Steve\_Coughlin](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@Steve\_Coughlin](https://forum.inductiveautomation.com/u/Steve_Coughlin)\
**Post date:** [October 30, 2023, 8:09pm UTC](https://forum.inductiveautomation.com/t/xy-chart-adding-in-a-usl-and-lsl/81194/5 "2023-10-30T20:09:52Z")

</div>

Ahh good tip! 🙂
