update tests, change naming

This commit is contained in:
Loewy
2024-01-10 18:09:47 -08:00
parent 6c7ceb3eb3
commit dee04269bd
4 changed files with 10 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
import React from 'react';
import { Path } from 'react-native-svg';
import { calculateBarProps, drawBarPath } from './custom-bar-utils';
import { calculateBarOrigin, drawBarPath } from './custom-bar-utils';
import { ScaleFunction } from './graph-types';
interface BarProps {
@@ -27,7 +27,7 @@ export const Bar: React.FC<BarProps> = ({
gap,
roundedRadius
}) => {
const { xOrigin, yOrigin, height } = calculateBarProps({
const { xOrigin, yOrigin, height } = calculateBarOrigin({
scaleX,
scaleY,
index,

View File

@@ -12,7 +12,7 @@ type BarCalculationProps = {
gap: number;
};
export function calculateBarProps({
export function calculateBarOrigin({
scaleX,
scaleY,
barWidth,

View File

@@ -41,8 +41,8 @@ export const CustomBars: React.FC<CustomBarsProps> = ({
scaleX={scaleX}
scaleY={scaleY}
data={item.data[index]}
barNumber={i}
index={index}
barNumber={i} // index of bar
index={index} // index of group
fill={barColors[i]}
barWidth={barWidth}
gap={gap}