Hi all
Paging/scrolling/sliding/stacking
Despite potentially wide application, pagination/scrolling/stacking/sliding of pages does not seem to have attracted much attention yet in the forum. Searches for these or (external) examples of CSS3 paging transitions suggested in
https://groups.google.com/forum/?hl=en#!topic/d3-js/vs7_FlNIHLk have so far more or less drawn a blank. Many existing slider/pagination libraries seem primarily more concerned with feats of black-box juggling than with continued data transparency.
Object positioning
SVG objects such as lines and paths are often scaled or indexed differently. Path positioning is, for example, often governed by transitions working on an index rather than (say) the linear scales used to place tick lines. How best are could they be harmonised?
Range limits and paging
Mutual limits on the visible and total ranges would, for effective scrolling or paging or individual translations, seem to be a must. If viable, how would they interact?
~ ~ + ~ ~
Brainstorming
Rather than labouring alone on this, some gathered "best practice" guidelines and relevant examples might make more sense. Can you help? These might touch on:
- easily applied d3-native, CSS3 and other pagination/stacking/scrolling/sliding mechanisms allowing sequential presentation of a data range, but leaving each DOM object's properties fully exposed
- the issue of visible versus total data ranges, and how best to handle them
- the establishment of mutual range limits and addressing across different types of svg artifact
- relative speed of execution
Background
My particular focus at the moment is in the area of multi-page timelines exploiting multiple svg artifacts and positioning techniques.
As a focus for discussion, in the following (a display recording gaming wins), I've set up a series of vertical "time_interval" lines on a horizontal chart, the number of these shown being limited by "x_vis_intervals". I can then map winnings ("tokens_horiz") onto this.
Though parent data and scales generally seem accessible to HTML DOM children, here, tokens_horiz ignores .data(x_vis_tokens.ticks(max_tokens_vis)) definition in the containing g tag, with the result that tokens shoot happily off the right edge of the screen...
Another is that the larger (read "entire") data range (let's call it x_total_intervals) is far greater than that used here and actually seen (x_vis_intervals). Though not implemented here, experiment suggests I can define two linear scales, one for the entire, background data range and one for the visible subsection only. The former would be applied to the containing definitions, the latter to the actual screen representations.
game_horiz = player.selectAll("g.x_game")
.data(x_vis_tokens.ticks(max_tokens_vis))
.enter()
.append("svg:g")
.attr("class", "x_game");
var time_interval = game_horiz.append("svg:g")
.attr("class", function(d,i) {
return "time_interval" + i.toString()
});
// Vertical timelines
time_interval.append("svg:line")
.attr("class", "barline" )
.attr("x1", x_vis_intervals)
.attr("x2", x_vis_intervals)
.attr("y1", off_game_margin)
.attr("y2", off_game_margin + game_height_vis)
.attr("stroke", "#999");
// Success tokens
var tokens_horiz = game_horiz.append("svg:g")
.attr("class", function(d,i) {
return i.toString()
});
tokens_horiz.append("svg:path")
.attr("class", function(d, i) {
return "note." + i.toString();
})
.attr("d", function(d, i) {
return (all_token_glyphs[i].token)
})
.attr("transform", function(d, i) {
......
});
Insights, examples and suggestions appreciated. :-)
Thanks
Thug