Skip to content
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

Add types: VictoryErrorBar #1528

Merged
merged 8 commits into from
May 4, 2020
Merged

Add types: VictoryErrorBar #1528

merged 8 commits into from
May 4, 2020

Conversation

kale-stew
Copy link
Contributor

Still need to resolve various issues with the styles in the demo

@kale-stew kale-stew marked this pull request as ready for review April 29, 2020 18:29
Copy link
Member

@wsparsons wsparsons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good. Went through the docs and found missing props that need to be added to VictoryErrorBarProps interface

errorY?: number | number[];
};

export interface VictoryErrorBarProps extends VictoryCommonProps {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think VictoryErrorBarProps might need to extend the following:

Also adds the following missing props

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for catching those!

data?: dataType | dataType[];
errorX?: number | number[];
errorY?: number | number[];
events?: EventPropTypeInterface<"data" | "labels" | "parent", StringOrNumberOrCallback>[];
Copy link
Member

@wsparsons wsparsons Apr 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the second argument for EventPropTypeInterface might need to add StringOrNumberOrCallback | string[] so
EventPropTypeInterface<"data" | "labels" | "parent", StringOrNumberOrCallback | string[]>[];

since eventKey type is the following string || integer || array[string] || function https://formidable.com/open-source/victory/docs/victory-error-bar#eventkey

VictoryLabelableProps,
VictoryMultiLabelableProps {
borderWidth?: number;
errorX?: number | number[];
Copy link
Contributor

@boygirl boygirl Apr 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

errorX and errorY are data accessor props like x and y on other components. They should use the same type as those, which includes functions, integers, strings, and arrays of strings.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! Sorry, question: is an array of ints allowed?

Copy link
Contributor

@boygirl boygirl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Just needs a fix for errorX and errorY. Otherwise approved.

@maddles maddles merged commit e7c3e58 into master May 4, 2020
@wsparsons wsparsons changed the title [WIP] Add types: VictoryErrorBar Add types: VictoryErrorBar May 4, 2020
@boygirl boygirl deleted the types/victory-errorbar branch June 23, 2020 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants