Wired splines representation when stable data
See original GitHub issueHi @osdnk,
I’m doing some tests with stable data (without variation) and the graph looks weird:

The line dotted in purple is the path of react-native-animated-charts (I don’t know why it does those splines), and on the other hand the chart in the background is the representation of victory charts using the same dataset.
Here I attach dataset and ChartPathProvider configuration, it would be very useful if you can help me @osdnk.
const data = [
{
"x": 0,
"y": 138.35,
},
{
"x": 1,
"y": 138.35,
},
{
"x": 2,
"y": 138.35,
},
{
"x": 3,
"y": 138.35,
},
{
"x": 4,
"y": 138.35,
},
{
"x": 5,
"y": 138.35,
},
{
"x": 6,
"y": 138.35,
},
];
const points = React.useMemo(
() => ({
points: interpolator({
data,
includeExtremes: true,
range: 300, // ~1 year of working days
}),
smoothingStrategy: 'bezier',
}),
[data]
);
<ChartPathProvider data={points}>
<ChartPath height={SIZE / 2} stroke="yellow" width={SIZE} />
</ChartPathProvider>
Thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
56 SPLINES AND GEOMETRIC MODELING
INTRODUCTION. Piecewise polynomials of fixed degree and continuously differentiable up to some order are known as splines or finite elements.
Read more >Curves and Splines in CAD - Wirebiters
As a result, irregular curves are represented by a combination of starting/ending points, derivative data, and hull shape points.
Read more >Spline Surface - an overview | ScienceDirect Topics
NURBS surfaces exported by CAD systems to represent the surface of the solid are bivariate vector valued piecewise rational functions that are defined...
Read more >Spline approximation-based data compression for sensor ...
A lossy but error-bounded sensor array data compression algorithm is proposed, in which the major part of the sensor array data are approximated ......
Read more >A review of spline function procedures in R
A polynomial spline such as a cubic or a B-spline, can be erratic at the boundaries of the data. To address this issue,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey, many thanks. Let me quickly take a look
Hey, Use the newest version and adjust your code by adding y bounds: