I’m really new with formidable’s Victory components for modular charting and data visualization. For the last few days I’m trying to change the font to “Poppins font” in my Victory Bar component. But it’s not seems possible with my very little knowledge. It’s showing “Helvetica Neue” fonts. Which is default font of Victory. Victory’s documentation has no clear instruction on changing font type.
Is there any way to solve this?
Here is my code. I’m using React with NextJS.
import {
VictoryBar,
VictoryChart,
VictoryTheme,
VictoryTooltip,
} from "victory";
const data = [
{ reptile: "lizard", awesomeness: 3234 },
{ reptile: "snake", awesomeness: 2048 },
{ reptile: "crocodile", awesomeness: 2600 },
{ reptile: "alligator", awesomeness: 9000 },
];
const x = "reptile";
const y = "awesomeness";
function Victory() {
return (
<div>
<VictoryChart theme={VictoryTheme.material} domainPadding={{ x: 20 }}>
<VictoryBar
style={{ data: { fill: "#2563eb" } }}
data={data}
x={x}
y={y}
alignment="start"
labels={({ datum }) => datum.awesomeness}
labelComponent={<VictoryTooltip />}
/>
</VictoryChart>
</div>
);
}
export default Victory;


