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 demo for box plot, clean up label prop defs for box plot #1508

Merged
merged 3 commits into from
Apr 14, 2020

Conversation

maddles
Copy link
Contributor

@maddles maddles commented Apr 9, 2020

No description provided.

StringOrNumberOrCallback,
VictoryDatableProps,
VictoryCommonProps,
VictoryStyleInterface,
VictoryStyleObject
} from "victory-core";

export type VictoryBoxPlotLabelType =
| boolean
| any[]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wasn't sure about this... should we be enforcing strings and numbers rather than any?

Copy link
Contributor

@boygirl boygirl Apr 9, 2020

Choose a reason for hiding this comment

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

I think victory-core exposes a StringOrNumberOrCallback type that would be useful here rather than the plain function.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, actually I guess it's a bit different for VictoryBoxPlot, but you might be able to borrow some of the ideas from https://github.com/FormidableLabs/victory/blob/master/packages/victory-core/src/index.d.ts#L109

Copy link
Contributor

Choose a reason for hiding this comment

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

And yes, let's use string | number instead of any

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.

This is looking great. I would be a bit stricter about VictoryBoxPlotLabelType, but otherwise good to go. Also, for future, please write breif descriptions for your PRs

@boygirl
Copy link
Contributor

boygirl commented Apr 10, 2020

Oops! Please also run nps format and commit the prettier results. That's what's causing CI to fail here.

@boygirl
Copy link
Contributor

boygirl commented Apr 14, 2020

@maddles this is approved! I'm going to merge now.

@boygirl boygirl merged commit f16916f into master Apr 14, 2020
@boygirl boygirl deleted the task/audit-victory-box-plot-typescript-props branch April 14, 2020 17:00
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.

2 participants