update tests, change naming
This commit is contained in:
@@ -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,
|
||||
|
@@ -12,7 +12,7 @@ type BarCalculationProps = {
|
||||
gap: number;
|
||||
};
|
||||
|
||||
export function calculateBarProps({
|
||||
export function calculateBarOrigin({
|
||||
scaleX,
|
||||
scaleY,
|
||||
barWidth,
|
||||
|
@@ -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}
|
||||
|
Reference in New Issue
Block a user