Chart Renderer Line for smooth view

Hello I found a post (Chart cubic interpolation) 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

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

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

1 Like

Done