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
Feature: date range selector support for charts #594
Feature: date range selector support for charts #594
Conversation
Replace the whole dateRange object in scope instead of changing min and max properties one-by-one. Given how angular `$watch` works with Moment.js object, I wrote some comment to clarify the right way to update dateRange.
Signed-off-by: John Wu <webmaster@leapoahead.com>
Signed-off-by: John Wu <webmaster@leapoahead.com>
Signed-off-by: John Wu <webmaster@leapoahead.com>
…nge selector Signed-off-by: John Wu <webmaster@leapoahead.com>
Signed-off-by: John Wu <webmaster@leapoahead.com>
Signed-off-by: John Wu <webmaster@leapoahead.com>
Signed-off-by: John Wu <webmaster@leapoahead.com>
`seriesCollection` -> `allSeries` (shorter) `s` -> `series` Signed-off-by: John Wu <webmaster@leapoahead.com>
|
/** | ||
* Update date range by finding date extremes | ||
* | ||
* ISSUE: chart.getExtreme() does not support getting Moment object out of box |
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.
If chart.getExtreme
works right but the only problem is that it returns non Moment
objects, we can convert them. Might be easier than searching ourselves.
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.
No, it simply returns something like 1
, 2
, 3
...
Signed-off-by: John Wu <webmaster@leapoahead.com>
Signed-off-by: John Wu <webmaster@leapoahead.com>
@tjwudi this is ready for merge, right? |
Yup, for me it's ready :) @arikfr |
👍 |
1 similar comment
👍 |
@arikfr when to merge? |
@Danier-Evens probably in this week. @arikfr sent me an email saying that he is kinda busy working on something else. :) |
max: moment.max.apply(undefined, _.map(allSeries, function (series) { | ||
return moment.max(_.pluck(series.data, 'x')); | ||
})) | ||
}; |
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.
Are you sure this is working?
I've just tried it, and I get min as 1/1/1970 and max as current date.
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 just noticed that you upgraded moment. I guess that's the issue.
Feature: date range selector support for charts
Took me a while, but it's finally merged. 👍 |
Awesome! Thanks! |
…selector Feature: date range selector support for charts
Date range selector allows you to zoom in & zoom out by date range. Although, we can use HighStock to achieve this, it is quite a big overhead, both to performance and engineering time. It is quite simple though.