Skip to content

Commit c1c2189

Browse files
committed
improve axis formatting ui
1 parent f7f3a16 commit c1c2189

File tree

3 files changed

+23
-14
lines changed

3 files changed

+23
-14
lines changed

apps/web/src/components/v2Editor/customBlocks/visualizationV2/FormatControls.tsx

+7-9
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,13 @@ export const NumberFormatControl = ({
137137
disabled={!dataframe || !isEditable}
138138
/>
139139

140-
<div className="mt-4">
141-
<AxisModifierSelector
142-
label="Separator"
143-
value={currentFormat?.separatorStyle || '999,999.99'}
144-
options={NUMBER_SEPARATOR_OPTIONS}
145-
onChange={(style) => onChangeSeparatorStyle(seriesId, style)}
146-
disabled={!dataframe || !isEditable}
147-
/>
148-
</div>
140+
<AxisModifierSelector
141+
label="Separator"
142+
value={currentFormat?.separatorStyle || '999,999.99'}
143+
options={NUMBER_SEPARATOR_OPTIONS}
144+
onChange={(style) => onChangeSeparatorStyle(seriesId, style)}
145+
disabled={!dataframe || !isEditable}
146+
/>
149147

150148
<div className="mt-4">
151149
<label

apps/web/src/components/v2Editor/customBlocks/visualizationV2/tabs/XAxisTab.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ const XAxisTab = ({
266266

267267
{/* Date formatting options - only show for date columns */}
268268
{isDateColumn && (
269-
<div className="mb-6 p-4 bg-gray-50 rounded-md">
269+
<div className="mb-6 p-4 bg-gray-50 rounded-md border border-gray-200 shadow-sm">
270270
<h3 className="text-xs font-medium mb-4">Date formatting</h3>
271271
<DateFormatControl
272272
currentFormat={xAxisDateFormat}
@@ -281,8 +281,10 @@ const XAxisTab = ({
281281

282282
{/* Number formatting options - only show for number columns */}
283283
{isNumberColumn && (
284-
<div className="mb-6 p-4 bg-gray-50 rounded-md">
285-
<h3 className="text-xs font-medium mb-4">Number formatting</h3>
284+
<div className="mb-6 p-4 bg-gray-50 rounded-md border border-gray-200 shadow-sm">
285+
<h3 className="text-xs font-medium mb-1 text-gray-900">
286+
Label formatting
287+
</h3>
286288
<NumberFormatControl
287289
initialDecimalPlaces={decimalPlacesInput}
288290
initialMultiplier={multiplierInput}

apps/web/src/components/v2Editor/customBlocks/visualizationV2/tabs/YAxisTab.tsx

+11-2
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,21 @@ const YAxisSection = ({
206206
const isNumberType = isNumberSeries(series)
207207

208208
return (
209-
<div key={series.id} className="mb-6 p-4 bg-gray-50 rounded-md">
209+
<div
210+
key={series.id}
211+
className="mb-6 p-4 bg-gray-50 rounded-md border border-gray-200 shadow-sm"
212+
>
210213
<div className="flex justify-between items-center mb-4">
211-
<h3 className="text-sm font-medium">Series {seriesIndex + 1}</h3>
214+
<h2 className="text-sm font-semibold text-gray-900">
215+
{axisIndex === 0 ? 'Left' : 'Right'} series {seriesIndex + 1}
216+
</h2>
212217
<span className="text-xs text-gray-500 italic">{columnName}</span>
213218
</div>
214219

220+
<h3 className="text-xs font-medium text-gray-900 mb-1">
221+
Label formatting
222+
</h3>
223+
215224
{isDateType && (
216225
<DateFormatControl
217226
currentFormat={series.dateFormat || null}

0 commit comments

Comments
 (0)