reactchartjs / react-chartjs-2

React components for Chart.js, the most popular charting library
https://react-chartjs-2.js.org
MIT License
6.64k stars 2.37k forks source link

Tension(curve) for two data points #1224

Open vignesh-4554 opened 3 months ago

vignesh-4554 commented 3 months ago

Would you like to work on this feature?

What problem are you trying to solve?

Currently, the Line component in the react-chartjs-2 package requires a minimum of three data points to render a smooth curve using the tension property. This limitation poses a problem for cases where you only have two data points but still wish to display a curved line between them. Without the ability to use the tension property with just two data points, the line appears as a straight line, which can be less visually informative or aesthetically pleasing.

Actual Screenshot: image

Expected Screenshot:

curve

Describe the solution you'd like

I would like to request an enhancement to the Line component in the react-chartjs-2 package to allow the use of the tension property with a minimum of two data points.

Describe alternatives you've considered

No response

Documentation, Adoption, Migration Strategy

No response