File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ type GraphPathConfig = {
4646 /**
4747 * Smoothing of the graph path (usually between 0.2 and 0.5)
4848 */
49- smoothing ? : number
49+ smoothing : number
5050 /**
5151 * Range of the graph's x and y-axis
5252 */
@@ -134,9 +134,6 @@ export const pixelFactorY = (
134134 return ( y - minValue ) / diff
135135}
136136
137- // A Graph Point will be drawn every second "pixel"
138- const PIXEL_RATIO = 2
139-
140137type GraphPathWithGradient = { path : SkPath ; gradientPath : SkPath }
141138
142139function createGraphPathBase (
@@ -146,7 +143,7 @@ function createGraphPathBase(props: GraphPathConfigWithoutGradient): SkPath
146143
147144function createGraphPathBase ( {
148145 points,
149- smoothing = 0.2 ,
146+ smoothing,
150147 range,
151148 horizontalPadding,
152149 verticalPadding,
@@ -227,7 +224,7 @@ function createGraphPathBase({
227224 const deltaX = point . date . getTime ( ) - prev . date . getTime ( )
228225 const drawingFactor = deltaX / spanX
229226 const drawingPixels = actualWidth * drawingFactor + horizontalPadding
230- const numberOfDrawingPoints = Math . floor ( drawingPixels / PIXEL_RATIO )
227+ const numberOfDrawingPoints = Math . floor ( drawingPixels )
231228
232229 for ( let i2 = 0 ; i2 <= numberOfDrawingPoints ; i2 ++ ) {
233230 const p = splineFunction ( i2 / numberOfDrawingPoints )
You can’t perform that action at this time.
0 commit comments