TanStack / react-charts

⚛️ Simple, immersive & interactive charts for React
https://react-charts.tanstack.com
MIT License
2.98k stars 243 forks source link

[beta] Issue attempting to overwrite font family #248

Open delanebob opened 3 years ago

delanebob commented 3 years ago

I have been setting up the v3 beta version of react-charts and I wanted to apply a custom font to the axis labels in the charts.

It looks like it's being taken from the hardcoded san-serif that's here: https://github.com/tannerlinsley/react-charts/blob/7c22d283f8c5a1dec880dc42e7801a4e4d9ac2ca/src/components/Chart.tsx#L687

I know there is a styles prop that you can pass in which I tried to use, but this is applied to the Chart component (parent of ChartInner), so it doesn't take effect.

Would it make sense to move the above san-serif line up-to where the external styles are applied, or is there another suggested way for overwriting font-family?