We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is not a victory-native specific issue. (Issues that only appear in victory-native should be opened here)
victory-native
I have read through the FAQ and Guides before asking a question
I am using the latest version of Victory
I've searched open issues to make sure I'm not opening a duplicate issue
I want to provide my own theme, but I get the following error in TypeScript:
No overload matches this call. Overload 1 of 2, '(props: Readonly<VictoryChartProps>): VictoryChart', gave the following error. Type '{ area: { style: { data: { fill: string; }; labels: { fontFamily: string; fontSize: number; letterSpacing: string; padding: number; fill: string; stroke: string; }; }; } & { width: number; height: number; padding: number; colorScale: string[]; }; ... 14 more ...; voronoi: { ...; } & { ...; }; }' is not assignable to type 'VictoryThemeDefinition'. Types of property 'axis' are incompatible. Type '{ style: { axis: { fill: string; stroke: string; strokeWidth: number; strokeLinecap: string; strokeLinejoin: string; }; axisLabel: { textAnchor: string; } & { fontFamily: string; fontSize: number; letterSpacing: string; padding: number; fill: string; stroke: string; } & { ...; }; grid: { ...; }; ticks: { ...; }; tic...' is not assignable to type '({ style?: { axis?: CSSProperties | undefined; axisLabel?: CSSProperties | undefined; grid?: CSSProperties | undefined; ticks?: TickProps | undefined; tickLabels?: CSSProperties | undefined; } | undefined; } & ThemeBaseProps) | undefined'. Type '{ style: { axis: { fill: string; stroke: string; strokeWidth: number; strokeLinecap: string; strokeLinejoin: string; }; axisLabel: { textAnchor: string; } & { fontFamily: string; fontSize: number; letterSpacing: string; padding: number; fill: string; stroke: string; } & { ...; }; grid: { ...; }; ticks: { ...; }; tic...' is not assignable to type '{ style?: { axis?: CSSProperties | undefined; axisLabel?: CSSProperties | undefined; grid?: CSSProperties | undefined; ticks?: TickProps | undefined; tickLabels?: CSSProperties | undefined; } | undefined; } & ThemeBaseProps'. Type '{ style: { axis: { fill: string; stroke: string; strokeWidth: number; strokeLinecap: string; strokeLinejoin: string; }; axisLabel: { textAnchor: string; } & { fontFamily: string; fontSize: number; letterSpacing: string; padding: number; fill: string; stroke: string; } & { ...; }; grid: { ...; }; ticks: { ...; }; tic...' is not assignable to type '{ style?: { axis?: CSSProperties | undefined; axisLabel?: CSSProperties | undefined; grid?: CSSProperties | undefined; ticks?: TickProps | undefined; tickLabels?: CSSProperties | undefined; } | undefined; }'. The types of 'style.axis.strokeLinecap' are incompatible between these types. Type 'string' is not assignable to type '\"-moz-initial\" | \"inherit\" | \"initial\" | \"revert\" | \"unset\" | \"round\" | \"butt\" | \"square\" | undefined'. Overload 2 of 2, '(props: VictoryChartProps, context?: any): VictoryChart', gave the following error. Type '{ area: { style: { data: { fill: string; }; labels: { fontFamily: string; fontSize: number; letterSpacing: string; padding: number; fill: string; stroke: string; }; }; } & { width: number; height: number; padding: number; colorScale: string[]; }; ... 14 more ...; voronoi: { ...; } & { ...; }; }' is not assignable to type 'VictoryThemeDefinition'.
I have simply created a component with:
import victoryTheme from '/victoryTheme'; <VictoryChart theme={victoryTheme}></VictoryChart>
And the content of victoryTheme.ts is exactly the same content as https://github.com/FormidableLabs/victory/blob/v34.3.12/packages/victory-core/src/victory-theme/grayscale.js
victoryTheme.ts
I am using Victory 34.3.12.
The text was updated successfully, but these errors were encountered:
@slhck Did you figure a way around this? I'm having the same issue.
Sorry, something went wrong.
Sorry, I moved to another library since I couldn't figure this out.
Successfully merging a pull request may close this issue.
Bugs and Questions
Checklist
This is not a
victory-native
specific issue. (Issues that only appear invictory-native
should be opened here)I have read through the FAQ and Guides before asking a question
I am using the latest version of Victory
I've searched open issues to make sure I'm not opening a duplicate issue
The Problem
I want to provide my own theme, but I get the following error in TypeScript:
Reproduction
I have simply created a component with:
And the content of
victoryTheme.ts
is exactly the same content as https://github.com/FormidableLabs/victory/blob/v34.3.12/packages/victory-core/src/victory-theme/grayscale.jsI am using Victory 34.3.12.
The text was updated successfully, but these errors were encountered: