import { ScaleLinear, format } from "d3"; import React from "react"; type Props = { dataset: number[][]; xScale: ScaleLinear; yScale: ScaleLinear; }; export const TextsWithG = ({ dataset, xScale, yScale }: Props) => { // console.log("dataset in texts with g", dataset); // const asPercentage = format(".1%"); const toFixed = format(".1f"); return ( {dataset.map((d) => ( {`${toFixed( d[0] )}, ${toFixed(d[1])}`} ))} ); };