import { spring, useCurrentFrame, useVideoConfig } from "remotion"; import { StyleAndClass } from "@asius/base"; import { GraphProps } from "@asius/base"; import { useColors } from "../useColors"; export const defaultGraphProps: GraphProps = { comp: "graph", type: "bar", src: [ 2, 5, 2, 9, 5, 3, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ], color: "#0000FFFF", gap: 3, roundness: 10, animationDuration: 2, animationStart: 0, width: 100, height: 100, }; export const Graph = ({ color, src: values, max, style, className, animationDuration, animationStart, width = 0, height = 0, ...props }: GraphProps & StyleAndClass) => { const frame = useCurrentFrame(); const { fps } = useVideoConfig(); const getColor = useColors(); const maxValue = max || Math.max(...values); if (props.type === "bar") return (