-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
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
fix(charts): adjust for Victory type changes #10082
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,7 @@ export interface ChartLegendTooltipProps extends ChartCursorTooltipProps { | |
/** | ||
* The angle prop specifies the angle to rotate the tooltip around its origin point. | ||
*/ | ||
angle?: string | number; | ||
angle?: number; | ||
/** | ||
* The center prop determines the position of the center of the tooltip flyout. This prop should be given as an object | ||
* that describes the desired x and y svg coordinates of the center of the tooltip. This prop is useful for | ||
|
@@ -275,7 +275,7 @@ export interface ChartLegendTooltipProps extends ChartCursorTooltipProps { | |
* | ||
* @propType number | string | Function | string[] | number[] | ||
*/ | ||
text?: StringOrNumberOrCallback | string[] | number[]; | ||
text?: string[] | StringOrNumberOrCallback; | ||
/** | ||
* The theme prop specifies a theme to use for determining styles and layout properties for a component. Any styles or | ||
* props defined in theme may be overwritten by props specified on the component instance. | ||
|
@@ -295,11 +295,8 @@ export interface ChartLegendTooltipProps extends ChartCursorTooltipProps { | |
themeColor?: string; | ||
/** | ||
* The title prop specifies a title to render with the legend. | ||
* This prop should be given as a string, or an array of strings for multi-line titles. | ||
* | ||
* Example: title={(datum) => datum.x} | ||
*/ | ||
title?: string | string[] | Function; | ||
title?: string; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same question here about whether this would break people passing a one of the removed types. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This must match the current Victory type exactly in order to compile. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahhh. So it is a breaking change from Victory then. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, not much we can do but match the Victory changes |
||
/** | ||
* This prop refers to the width of the svg that ChartLegendTooltip is rendered within. This prop is passed from | ||
* parents of ChartLegendTooltip, and should not be set manually. In versions before ^33.0.0 this prop referred to the | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this break people who are passing a string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This must match the current Victory type exactly in order to compile. I suspect Victory corrected the type because only a number is supported.