import { ScaleBand, ScaleLinear } from "d3-scale"; import React from "react"; type Props = { dataset: number[]; height: number; xScale: ScaleBand; yScale: ScaleLinear; }; export const Bar = ({ dataset, height, xScale, yScale }: Props) => { // console.log("dataset:", dataset); return ( {dataset.map((d, i) => { console.log("d", d, "i", i, "x:", xScale(i), "y", yScale(d)); return ( ); })} ); };