# Chart Renderer Line for smooth view

**URL:** <https://forum.inductiveautomation.com/t/chart-renderer-line-for-smooth-view/80404>\
**Category:** Ignition\
**Tags:** ignition81, scripting, vision\
**Created:** [October 12, 2023, 6:05pm UTC](https://forum.inductiveautomation.com/t/chart-renderer-line-for-smooth-view/80404 "2023-10-12T18:05:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gpellicelli](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/gpellicelli/32/53466_2.png) [@gpellicelli](https://forum.inductiveautomation.com/u/gpellicelli)\
**Post date:** [October 12, 2023, 6:05pm UTC](https://forum.inductiveautomation.com/t/chart-renderer-line-for-smooth-view/80404/1 "2023-10-12T18:05:51Z")

</div>

Hello I found a post ([Chart cubic interpolation](https://forum.inductiveautomation.com/t/chart-cubic-interpolation/35870)) that was giving tip for using renderer into chart but I got weird line with precision 15 and I try different and its not better. When I got 2 data that are the same value sometime its curving for no reason. Am putting the simple code that I use and share 2 picture. The script for now is on mouse press action

```auto
rom org.jfree.chart.renderer.xy import XYSplineRenderer

chart = event.source.chart
plot = chart.getXYPlot()

renderer = XYSplineRenderer()

# The Precision makes curve smooth ! You can play with changing the numbers.

renderer.setPrecision(15)

plot.setRenderer(renderer)

```

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

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/c/0c7916b73a58a05c8266259275d7bde06f365ccc.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [October 12, 2023, 6:17pm UTC](https://forum.inductiveautomation.com/t/chart-renderer-line-for-smooth-view/80404/2 "2023-10-12T18:17:56Z")

</div>

You have added both Perspective and Vision tags to your question title. It can't be both. Please remove one of them.

---

<div class="post-metadata">

**Author:** ![gpellicelli](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/gpellicelli/32/53466_2.png) [@gpellicelli](https://forum.inductiveautomation.com/u/gpellicelli)\
**Post date:** [October 12, 2023, 6:23pm UTC](https://forum.inductiveautomation.com/t/chart-renderer-line-for-smooth-view/80404/3 "2023-10-12T18:23:23Z")

</div>

Done
