INNER CODE UNIT · TypeScript
createGraphPathBase
margelo/react-native-graph · src/CreateGraphPath.ts:134
function createGraphPathBase(props: GraphPathConfigWithoutGradient): SkPath;
function createGraphPathBase({
pointsInRange: graphData,
range,
horizontalPadding,
verticalPadding,
canvasHeight: height,
canvasWidth: width,
shouldFillGradient,
}: GraphPathConfigWithGradient | GraphPathConfigWithoutGradient):
| SkPath
| GraphPathWithGradient {
const path = Skia.Path.Make();
// Canvas width substracted by the horizontal padding => Actual drawing width
const drawingWidth = width - 2 * horizontalPadding;
// Canvas height substracted by the vertical padding => Actual drawing height