react-charts
react-charts copied to clipboard
Unable to change font size, other styles
I am using the latest version of react-charts, 3.0.0-beta.57
I'm attempting to change the styling options of the
Based on this type definition of AxisOptions, there is styles field which can be changed.
export declare type AxisOptionsBase = {
....
styles?: CSSProperties & {
line?: CSSProperties;
tick?: CSSProperties;
};
};
I have attempted to set the tick font size via the following:
const primaryAxis = useMemo(
(): AxisOptions<ChartSubmissionDatum> => ({
getValue: datum => datum.date,
styles: {
tick: {fontSize:20}
},
}),
[]
);
However, this style is not being applied to the ticks. Further, I have been unable to change other CSS properties such as color, font family. Is this feature supported? None of the example code makes use of this style object and the documentation does not mention anything about it.