11"use client"
22
33import { useMemo } from "react"
4- import { ScatterChart , Scatter , XAxis , YAxis , Label , Customized , Cross , LabelList } from "recharts"
4+ import { ScatterChart , Scatter , XAxis , YAxis , Customized , Cross , LabelList } from "recharts"
55
66import { formatCurrency } from "@/lib"
77import { ChartContainer , ChartTooltip , ChartConfig } from "@/components/ui"
@@ -173,7 +173,7 @@ export const Plot = ({ tableData }: PlotProps) => {
173173
174174 return (
175175 < >
176- < div className = "pb -4 font-medium " > Cost Versus Score</ div >
176+ < div className = "pt -4 pb-8 font-mono " > Cost x Score</ div >
177177 < ChartContainer config = { chartConfig } className = "h-[500px] w-full" >
178178 < ScatterChart margin = { { top : 0 , right : 0 , bottom : 0 , left : 20 } } >
179179 < XAxis
@@ -184,9 +184,8 @@ export const Plot = ({ tableData }: PlotProps) => {
184184 ( dataMin : number ) => Math . round ( ( dataMin - 5 ) / 5 ) * 5 ,
185185 ( dataMax : number ) => Math . round ( ( dataMax + 5 ) / 5 ) * 5 ,
186186 ] }
187- tickFormatter = { ( value ) => formatCurrency ( value ) } >
188- < Label value = "Cost" position = "bottom" offset = { 0 } />
189- </ XAxis >
187+ tickFormatter = { ( value ) => formatCurrency ( value ) }
188+ />
190189 < YAxis
191190 type = "number"
192191 dataKey = "score"
@@ -195,9 +194,8 @@ export const Plot = ({ tableData }: PlotProps) => {
195194 ( dataMin : number ) => Math . max ( 0 , Math . round ( ( dataMin - 5 ) / 5 ) * 5 ) ,
196195 ( dataMax : number ) => Math . min ( 100 , Math . round ( ( dataMax + 5 ) / 5 ) * 5 ) ,
197196 ] }
198- tickFormatter = { ( value ) => `${ value } %` } >
199- < Label value = "Score" angle = { - 90 } position = "left" dy = { - 15 } />
200- </ YAxis >
197+ tickFormatter = { ( value ) => `${ value } %` }
198+ />
201199 < ChartTooltip
202200 content = { ( { active, payload } ) => {
203201 if ( ! active || ! payload || ! payload . length || ! payload [ 0 ] ) {
0 commit comments