-
Notifications
You must be signed in to change notification settings - Fork 24
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
Scale using data with value/key is broken for time series #44
Comments
Thanks @tpitale for bringing this up, it was a fairly large assumption to default to 0 as the minimum for all non-ordinal scales. I'll update it to simply use the minimum shortly (with the existing option to override with |
I'd be happy to submit a PR if you'd like one. |
Or I could wait to try until after #43 is completed/merged. |
I'm a little on the fence about the future of
The I think the new approach is much more direct (with the tradeoff being slightly more to type), although I'm open to adding // Before
var xScale = {type: 'time', data: data, key: 'date'};
var x2Scale = {type: 'ordinal', domain: ['a', 'b', 'c'], adjacent: true, series: 2};
// After
var xScale = d3.time.scale()
.domain(getMinMaxDomain(data, 'date'));
var x2Scale = scaleBandSeries()
.domain(['a', 'b', 'c']).adjacent(true).seriesCount(2); I'm glad to hear you're using the library and would love to have your feedback! |
d3.compose/src/helpers/create-scale.js
Lines 137 to 144 in 3e8a75f
Does not work for
time
(and probably a lot of other scale types). The first time is always going to be > 0. But, we should still use the min value from the series.The text was updated successfully, but these errors were encountered: