@@ -84,6 +84,7 @@ const BarChart = React.forwardRef<HTMLDivElement, BarChartProps>((props, ref) =>
84
84
showTooltip = true ,
85
85
showLegend = true ,
86
86
showGridLines = true ,
87
+ showAxisLine = false ,
87
88
autoMinValue = false ,
88
89
minValue,
89
90
maxValue,
@@ -92,6 +93,7 @@ const BarChart = React.forwardRef<HTMLDivElement, BarChartProps>((props, ref) =>
92
93
onValueChange,
93
94
enableLegendSlider = false ,
94
95
customTooltip,
96
+ renderLabel,
95
97
rotateLabelX,
96
98
barCategoryGap,
97
99
tickGap = 5 ,
@@ -203,9 +205,15 @@ const BarChart = React.forwardRef<HTMLDivElement, BarChartProps>((props, ref) =>
203
205
"fill-tremor-content" ,
204
206
// dark
205
207
"dark:fill-dark-tremor-content" ,
208
+ // common
209
+ "stroke-1" ,
210
+ // light
211
+ "stroke-tremor-border" ,
212
+ // dark
213
+ "dark:stroke-dark-tremor-border" ,
206
214
) }
207
215
tickLine = { false }
208
- axisLine = { false }
216
+ axisLine = { showAxisLine }
209
217
angle = { rotateLabelX ?. angle }
210
218
dy = { rotateLabelX ?. verticalShift }
211
219
height = { rotateLabelX ?. xAxisHeight }
@@ -236,9 +244,15 @@ const BarChart = React.forwardRef<HTMLDivElement, BarChartProps>((props, ref) =>
236
244
"fill-tremor-content" ,
237
245
// dark
238
246
"dark:fill-dark-tremor-content" ,
247
+ // common
248
+ "stroke-1" ,
249
+ // light
250
+ "stroke-tremor-border" ,
251
+ // dark
252
+ "dark:stroke-dark-tremor-border" ,
239
253
) }
240
254
tickLine = { false }
241
- axisLine = { false }
255
+ axisLine = { showAxisLine }
242
256
tickFormatter = { valueFormatter }
243
257
minTickGap = { tickGap }
244
258
allowDecimals = { allowDecimals }
@@ -261,7 +275,7 @@ const BarChart = React.forwardRef<HTMLDivElement, BarChartProps>((props, ref) =>
261
275
< YAxis
262
276
width = { yAxisWidth }
263
277
hide = { ! showYAxis }
264
- axisLine = { false }
278
+ axisLine = { showAxisLine }
265
279
tickLine = { false }
266
280
type = "number"
267
281
domain = { yAxisDomain as AxisDomain }
@@ -275,6 +289,12 @@ const BarChart = React.forwardRef<HTMLDivElement, BarChartProps>((props, ref) =>
275
289
"fill-tremor-content" ,
276
290
// dark
277
291
"dark:fill-dark-tremor-content" ,
292
+ // common
293
+ "stroke-1" ,
294
+ // light
295
+ "stroke-tremor-border" ,
296
+ // dark
297
+ "dark:stroke-dark-tremor-border" ,
278
298
) }
279
299
tickFormatter = {
280
300
relative ? ( value : number ) => `${ ( value * 100 ) . toString ( ) } %` : valueFormatter
@@ -298,7 +318,7 @@ const BarChart = React.forwardRef<HTMLDivElement, BarChartProps>((props, ref) =>
298
318
width = { yAxisWidth }
299
319
hide = { ! showYAxis }
300
320
dataKey = { index }
301
- axisLine = { false }
321
+ axisLine = { showAxisLine }
302
322
tickLine = { false }
303
323
ticks = { startEndOnly ? [ data [ 0 ] [ index ] , data [ data . length - 1 ] [ index ] ] : undefined }
304
324
type = "category"
@@ -313,6 +333,12 @@ const BarChart = React.forwardRef<HTMLDivElement, BarChartProps>((props, ref) =>
313
333
"fill-tremor-content" ,
314
334
// dark
315
335
"dark:fill-dark-tremor-content" ,
336
+ // common
337
+ "stroke-1" ,
338
+ // light
339
+ "stroke-tremor-border" ,
340
+ // dark
341
+ "dark:stroke-dark-tremor-border" ,
316
342
) }
317
343
>
318
344
{ yAxisLabel && (
@@ -396,6 +422,7 @@ const BarChart = React.forwardRef<HTMLDivElement, BarChartProps>((props, ref) =>
396
422
animationDuration = { animationDuration }
397
423
shape = { ( props : any ) => renderShape ( props , activeBar , activeLegend , layout ) }
398
424
onClick = { onBarClick }
425
+ label = { renderLabel }
399
426
/>
400
427
) ) }
401
428
</ ReChartsBarChart >
0 commit comments