yoshinakachi commited on
Commit
f4cfdd4
·
verified ·
1 Parent(s): 6600213

Update src/App.js

Browse files
Files changed (1) hide show
  1. src/App.js +14 -25
src/App.js CHANGED
@@ -143,7 +143,7 @@ const BenchmarkChart = () => {
143
  </p>
144
 
145
  {/* Control Button */}
146
- <div className="mt-4 flex justify-center">
147
  <button
148
  onClick={handleManualAnimate}
149
  className="px-6 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg font-semibold transition-colors"
@@ -155,6 +155,18 @@ const BenchmarkChart = () => {
155
 
156
  {/* Chart Container - Longer */}
157
  <div className="bg-white rounded-xl shadow-2xl p-4">
 
 
 
 
 
 
 
 
 
 
 
 
158
  <div className="h-[700px] overflow-y-auto pr-2">
159
  <div className="space-y-2">
160
  {benchmarkData.map((modelData, index) => {
@@ -164,20 +176,16 @@ const BenchmarkChart = () => {
164
  const baselineWidth = (baselineValue / maxValue) * 100;
165
  const totalWidth = (currentValue / maxValue) * 100;
166
  const extensionWidth = totalWidth - baselineWidth;
167
- const currentMethod = getCurrentMethod(modelData, currentPhase);
168
  const gain = currentValue - baselineValue;
169
 
170
  return (
171
  <div key={modelData.model} className="relative">
172
- {/* Model Name and Value - Fixed Height Layout */}
173
  <div className="flex items-center justify-between mb-1">
174
  <div>
175
  <h3 className="font-semibold text-gray-800 text-sm">
176
  {modelData.model}
177
  </h3>
178
- <p className="text-xs text-gray-600">
179
- {currentMethod}
180
- </p>
181
  </div>
182
  <div className="text-right flex items-center space-x-2">
183
  {gain > 0 && (
@@ -207,31 +215,12 @@ const BenchmarkChart = () => {
207
  width: currentPhase === 'additive_synthesis' && currentMethodIndex > 0 ? `${extensionWidth}%` : '0%'
208
  }}
209
  />
210
-
211
- {/* Percentage Label */}
212
- <div className="absolute right-2 top-0 h-full flex items-center">
213
- <div className="text-white font-semibold text-xs">
214
- {currentValue > 8 ? `${currentValue.toFixed(1)}%` : ''}
215
- </div>
216
- </div>
217
  </div>
218
  </div>
219
  );
220
  })}
221
  </div>
222
  </div>
223
-
224
- {/* Legend */}
225
- <div className="mt-4 pt-4 border-t border-gray-200 flex justify-center space-x-6 text-sm">
226
- <div className="flex items-center space-x-2">
227
- <div className="w-3 h-3 bg-gradient-to-r from-blue-500 to-blue-600 rounded"></div>
228
- <span className="text-gray-700">Human Baseline</span>
229
- </div>
230
- <div className="flex items-center space-x-2">
231
- <div className="w-3 h-3 bg-gradient-to-r from-green-500 to-green-600 rounded"></div>
232
- <span className="text-gray-700">Transformation Extension</span>
233
- </div>
234
- </div>
235
  </div>
236
 
237
  {/* Methodology Note - Moved Below Chart */}
 
143
  </p>
144
 
145
  {/* Control Button */}
146
+ <div className="flex justify-center">
147
  <button
148
  onClick={handleManualAnimate}
149
  className="px-6 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg font-semibold transition-colors"
 
155
 
156
  {/* Chart Container - Longer */}
157
  <div className="bg-white rounded-xl shadow-2xl p-4">
158
+ {/* Legend - At Top of Chart */}
159
+ <div className="mb-6 flex justify-center space-x-6 text-sm bg-gray-50 p-3 rounded-lg">
160
+ <div className="flex items-center space-x-2">
161
+ <div className="w-3 h-3 bg-gradient-to-r from-blue-500 to-blue-600 rounded"></div>
162
+ <span className="text-gray-700">Human Baseline</span>
163
+ </div>
164
+ <div className="flex items-center space-x-2">
165
+ <div className="w-3 h-3 bg-gradient-to-r from-green-500 to-green-600 rounded"></div>
166
+ <span className="text-gray-700">Transformation Extension</span>
167
+ </div>
168
+ </div>
169
+
170
  <div className="h-[700px] overflow-y-auto pr-2">
171
  <div className="space-y-2">
172
  {benchmarkData.map((modelData, index) => {
 
176
  const baselineWidth = (baselineValue / maxValue) * 100;
177
  const totalWidth = (currentValue / maxValue) * 100;
178
  const extensionWidth = totalWidth - baselineWidth;
 
179
  const gain = currentValue - baselineValue;
180
 
181
  return (
182
  <div key={modelData.model} className="relative">
183
+ {/* Model Name and Value - Cleaner Layout */}
184
  <div className="flex items-center justify-between mb-1">
185
  <div>
186
  <h3 className="font-semibold text-gray-800 text-sm">
187
  {modelData.model}
188
  </h3>
 
 
 
189
  </div>
190
  <div className="text-right flex items-center space-x-2">
191
  {gain > 0 && (
 
215
  width: currentPhase === 'additive_synthesis' && currentMethodIndex > 0 ? `${extensionWidth}%` : '0%'
216
  }}
217
  />
 
 
 
 
 
 
 
218
  </div>
219
  </div>
220
  );
221
  })}
222
  </div>
223
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
224
  </div>
225
 
226
  {/* Methodology Note - Moved Below Chart */}