-
Notifications
You must be signed in to change notification settings - Fork 80
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
Charts #232
Charts #232
Conversation
- Improved the color palette page - Updated contrib docs with new _lucidIsPrivate convention - Several new private components that power charts - Cleaned up variables.less - Updated generic tests to handle function props that don't start with `on` - Added new colors for charts - Added new utilities to support charts
* Classes are appended to root element along with existing classes using | ||
* the `classnames` library. | ||
*/ | ||
className: 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.
we're pretty inconsistent about this, but shouldn't this be 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.
Yeah, I flip flopped on this one. I feel like any
is better since we're running stuff through classnames
which could potentially be useful to a consumer.
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.
seems like consumer could just run through classnames
if they need to generate 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.
Cool beans, I'm fine with that. I'll fix my stuff up.
@@ -0,0 +1,107 @@ | |||
// Note: these tests are basically pin tests, given that we're rendering svgs, |
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.
filename
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.
What do you mean?
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.
src/components/BarChart/BarChar.spec.jsx
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.
should be src/components/BarChart/BarChart.spec.jsx
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.
Ahh, thank you!
* @return {array[]} - array of arrays, one for each field | ||
*/ | ||
export function groupByFields(collection, fields) { | ||
const fieldsArray = [].concat(fields); |
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.
what's this for
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.
Just some sugar to allow me to pass in either a string or an array of strings. I saw @ogupte doing it and I thought it was cool. And I want to be cool
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 a way to coerce any value into an array
// Domain | ||
const range = scale.range(); | ||
const sign = orient === 'top' || orient === 'left' ? -1 : 1; | ||
const isH = orient === 'top' || orient === 'bottom'; |
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.
is isH
short for isHorizontal
?
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 right. I wanted to keep it small since I'm using in lots of small ternaries.
…charts-squashed Conflicts: src/styles/variables.less
PR Checklist
common
at minimum)semver-
labelson