-
Notifications
You must be signed in to change notification settings - Fork 286
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
Just scrolling instead of browsing? #21
Comments
Can you give a concrete example ? As the domains are infinite, it'll be pretty hard to do, or are you talking about something else ? |
Let's say I have data loaded for 12 domains (12 months groups).
Yes. Just scrolling. The domains might be infinite, but there's a "first" and a "last" item that will correspond to a domain. |
Are you talking about responsive design ? Where you want the calendar to resize to show less domains when asked to ? Or you want to save ajax request by loading more datas than showed with the first request ? |
Yes. Not just save Ajax requests, but server code too: some data comes from other systems where would complicated to modify it ( to have extra parameters for the browsing), since we have no control over it, so just scrolling would be enough. |
From the server data, you want to preload all the data it's returning, or you want to filter them first ? (limiting with a first and end date). |
From a user's perspective I don't really know what's the difference between "preload" and "filter" :). What I want is just an extra setting (e.g. |
I'm wondering how do you fill these datas in the "hidden" domain. I believe you're loading these in the same ajax request than the visible domains. Let's say the ajax request can return datas for a whole month, and you're just displaying one week. So for the remaining 3 weeks, it'll be loaded automatically the first time, so when browsing, there's no more ajax request. What I want to know is if you want to use all the datas return by the server (3 weeks), or want to limit them with a first and end date (just use the data for let's say 2 weeks). |
I want to use the entire data (4 weeks) loaded in one single AJAX request. The chart would scroll to the left or to the right, so jumping one domain (like it is doing with browsing too) until there's a domain with no more data. |
I guess you want to disable browsing beyond certain date ? |
see here an illustration. I hope it helps http://www.asciiflow.com/#Draw5106642043834590516/1312689001
If there's no more data in the next domain than can be the domains where the scrolling ends on the right or the left side. |
Maybe you can do that "outside" cal-heatmap ? With the new features added since version 3, it should be possible, or close. First, don't pass the data's API url directly to cal-heatmap, fetch the data first and extract the first and last date, then pass them to init() via the Now that you have a json object, just pass it directly to cal-heatmap via Example: var data = d3.json('www.api.com/data.html');
// Extract the timestamps
var dates = Object.keys(data);
// Convert all string timestamp to integer
dates.map(function(d) { return parseInt(d, 10); });
// Sort the dates
dates.sort();
var cal = new CalHeatMap();
cal.init({
data: data,
minDate: dates.shift(),
maxDate: dates.pop()
}); |
…cb195f [Snyk] Security upgrade karma-coverage from 0.2.7 to 0.5.3
Is it possible to configure the cal-heatmap to look like it's configured for browsing (with next and previous buttons), but to do just a scrolling instead of the already loaded data?
I.e. to not load anything new from server, but just to scroll with one domain to the left or the right?
Thank you.
The text was updated successfully, but these errors were encountered: