@@ -43,17 +43,6 @@ const robustnessConfig = {
4343
4444const NARROW_CHART_PX = 560 ;
4545
46- const PHASE_LABEL_SHORT : Record < string , string > = {
47- "Herbal Transfer" : "Herbal" ,
48- "Cable Mounting" : "Cable" ,
49- "Binder Clip Removal" : "Binder" ,
50- } ;
51-
52- const TASK_LABEL_SHORT : Record < string , string > = {
53- "Herbal Transfer" : "Herbal" ,
54- "Cable Mounting" : "Cable" ,
55- } ;
56-
5746function useChartNarrow ( ref : React . RefObject < HTMLDivElement | null > ) {
5847 const [ narrow , setNarrow ] = React . useState ( false ) ;
5948
@@ -74,7 +63,7 @@ function useChartNarrow(ref: React.RefObject<HTMLDivElement | null>) {
7463export function GeneralizationUnseenChart ( ) {
7564 const chartRef = React . useRef < HTMLDivElement > ( null ) ;
7665 const narrow = useChartNarrow ( chartRef ) ;
77- const tickPx = narrow ? 7 : 10 ;
66+ const tickPx = narrow ? 8 : 10 ;
7867
7968 return (
8069 < Card className = "border border-white/20 bg-black/60 text-white" >
@@ -91,13 +80,13 @@ export function GeneralizationUnseenChart() {
9180 < ChartContainer
9281 ref = { chartRef }
9382 config = { chartConfig }
94- className = "!aspect-auto h-[232px ] md:h-[235px]"
83+ className = "!aspect-auto h-[248px ] md:h-[235px]"
9584 >
9685 < BarChart
9786 data = { chartData }
9887 margin = { {
9988 top : 12 ,
100- bottom : narrow ? 40 : 8 ,
89+ bottom : narrow ? 48 : 8 ,
10190 left : narrow ? 2 : 4 ,
10291 right : narrow ? 2 : 4 ,
10392 } }
@@ -110,18 +99,15 @@ export function GeneralizationUnseenChart() {
11099 tickLine = { false }
111100 axisLine = { false }
112101 tickMargin = { narrow ? 2 : 8 }
113- angle = { narrow ? - 34 : 0 }
102+ angle = { narrow ? - 36 : 0 }
114103 textAnchor = { narrow ? "end" : "middle" }
115104 interval = { 0 }
116- height = { narrow ? 52 : 28 }
105+ height = { narrow ? 58 : 28 }
117106 tick = { {
118107 fontSize : tickPx ,
119108 fill : "rgba(255,255,255,0.65)" ,
120109 } }
121110 dy = { narrow ? 4 : 0 }
122- tickFormatter = { ( v ) =>
123- narrow ? ( PHASE_LABEL_SHORT [ String ( v ) ] ?? String ( v ) ) : String ( v )
124- }
125111 />
126112 < YAxis
127113 domain = { [ 0 , 100 ] }
@@ -190,7 +176,7 @@ export function GeneralizationUnseenChart() {
190176export function RobustnessDisturbanceChart ( ) {
191177 const chartRef = React . useRef < HTMLDivElement > ( null ) ;
192178 const narrow = useChartNarrow ( chartRef ) ;
193- const tickPx = narrow ? 7 : 10 ;
179+ const tickPx = narrow ? 8 : 10 ;
194180
195181 return (
196182 < Card className = "border border-white/20 bg-black/60 text-white" >
@@ -206,13 +192,13 @@ export function RobustnessDisturbanceChart() {
206192 < ChartContainer
207193 ref = { chartRef }
208194 config = { robustnessConfig }
209- className = "!aspect-auto h-[238px ] md:h-[245px]"
195+ className = "!aspect-auto h-[252px ] md:h-[245px]"
210196 >
211197 < BarChart
212198 data = { robustnessWholeTaskData }
213199 margin = { {
214200 top : 12 ,
215- bottom : narrow ? 40 : 8 ,
201+ bottom : narrow ? 46 : 8 ,
216202 left : narrow ? 2 : 4 ,
217203 right : narrow ? 2 : 4 ,
218204 } }
@@ -225,18 +211,15 @@ export function RobustnessDisturbanceChart() {
225211 tickLine = { false }
226212 axisLine = { false }
227213 tickMargin = { narrow ? 2 : 8 }
228- height = { narrow ? 48 : 28 }
214+ height = { narrow ? 54 : 28 }
229215 interval = { 0 }
230- angle = { narrow ? - 32 : 0 }
216+ angle = { narrow ? - 34 : 0 }
231217 textAnchor = { narrow ? "end" : "middle" }
232218 tick = { {
233219 fontSize : tickPx ,
234220 fill : "rgba(255,255,255,0.65)" ,
235221 } }
236222 dy = { narrow ? 4 : 0 }
237- tickFormatter = { ( v ) =>
238- narrow ? ( TASK_LABEL_SHORT [ String ( v ) ] ?? String ( v ) ) : String ( v )
239- }
240223 />
241224 < YAxis
242225 domain = { [ 0 , 100 ] }
0 commit comments