-
Notifications
You must be signed in to change notification settings - Fork 835
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 example of difference bar chart #990
Conversation
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.
Thanks for the example.
(Optional) | ||
Type (VerticalBarSeries): `number` | ||
Type (HorizontalBarSeries): `string|number` | ||
The y0 position in coordinates of the box to be used, this is where the bottom of the bar is placed, defaults to zero. Use is not recommended with stacked bars. For VerticalBarSeries this value is considered a number, and is scaled against it's domain into pixels. |
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 was a very useful tidbit. I assume if one wanted to do DifferenceHorizontalBar, one sets x and x0 in a similar manner?
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.
Yep that's just right!
showcase/plot/difference-chart.js
Outdated
buttonContent={content} | ||
/> | ||
<XYPlot | ||
xType="time" |
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.
It's been several years since I had a look at the API. xType
, colorType
are something new and appear (in scan of the repo) in many various places. What does it mean to use it here in an XYPlot? By inference, xType
, describes the type of the x
values?
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.
Yea that's exactly it, check out https://uber.github.io/react-vis/documentation/general-principles/scales-and-data for a fuller description
* Add example of difference bar chart * use non temporal data to fix test
* Add example of difference bar chart * use non temporal data to fix test
This PR answers a question @alee8 asked me via email about how to make this type of chart.