Database Reference
In-Depth Information
back.transition().duration(0).call(arcTween,max);
});
In this case, the canvas itself is resized and the new dimensions obtained
from the fixup function. Next, the arcs are translated to their new position.
Because the element may have changed its smallest dimension, the inner
and outer radius must be recalculated. Finally, the backing arc is redrawn in
its new position. The front arc could also be redrawn, but it is updated often
by the streaming data so it is left alone in this case.
This is actually a bit easier for Canvas devices. Because a canvas rendering
needs to be redrawn completely on each pass, the resize event can simply set
a flag that tells the canvas to update its size on the next redraw.
Conclusion
Thischapterhascoveredthebasicsofsettingupaweb-basedapplication for
delivering real-time data. The next chapter builds on these concepts to add
the element of time to both the data and the visualizations.
Beyond that, the remainder of this topic does not really touch on the
mechanics of delivery and visualization. That is not to say that there is no
more to say on the subject. For the visualization component in particular,
this chapter barely scratches the surface of what is possible with these
frameworks.Theonlylimitistheimagination,astheysayinggoes,andthere
is plenty of inspiration out there. The first place to look would be Mike
Bostock's website ( http://bost .ocks.org/mike/ ) , which has no shortage of
in-depthD3tutorials.Hiswebsiteisparticularlyusefulwhenyou'relearning
how to visualize geographical data because he clearly has a special love for
cartography and D3's geographic support is impressive. The Flowing Data
website ( http://flowingdata.com ) is also a great source of visualizations.
Not all of them will be appropriate for real-time streaming data, but the
techniques are certainly applicable.
Search WWH ::




Custom Search