-
Notifications
You must be signed in to change notification settings - Fork 524
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
Conversation
StringOrNumberOrCallback, | ||
VictoryDatableProps, | ||
VictoryCommonProps, | ||
VictoryStyleInterface, | ||
VictoryStyleObject | ||
} from "victory-core"; | ||
|
||
export type VictoryBoxPlotLabelType = | ||
| boolean | ||
| any[] |
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.
Wasn't sure about this... should we be enforcing strings and numbers rather than any?
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.
I think victory-core
exposes a StringOrNumberOrCallback
type that would be useful here rather than the plain function.
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.
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
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.
And yes, let's use string | number
instead of any
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 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
Oops! Please also run |
…lot definitely typed defs
@maddles this is approved! I'm going to merge now. |
No description provided.