Skip to content

Commit be2808d

Browse files
authored
fix: make it possible to override font-family in style prop (#249)
1 parent 7c22d28 commit be2808d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/components/Chart.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ export function Chart<TDatum>({
201201
{...rest}
202202
className={`ReactChart ${className || ''}`}
203203
style={{
204+
fontFamily: 'sans-serif',
204205
...style,
205206
position: 'absolute',
206207
width,
@@ -682,11 +683,7 @@ function ChartInner<TDatum>({
682683

683684
return (
684685
<ChartContextProvider value={useGetLatest(contextValue)}>
685-
<div
686-
style={{
687-
fontFamily: 'sans-serif',
688-
}}
689-
>
686+
<div>
690687
<svg
691688
ref={svgRef}
692689
style={{

0 commit comments

Comments
 (0)