Quantcast
Viewing latest article 3
Browse Latest Browse All 43

dc.js v0.7 release with renderlet support

dc.js v0.7 released with:
  • elastic x axis support
  • improved bar chart position accuracy
  • renderlet support for injecting custom rendering logic
  • chart scoping support with update/redraw group
  • grid lines support on all coordinate charts
One of the most useful feature in this release, in my personal opinion, is the renderlet concept. Renderlet is basically a function that can be registered to any given chart (including widgets) at any given point of time (after creation or even after rendering) to inject your custom rendering logic. dc.js will take care of notification and scoping so to guarantee this custom rendering logic will always be invoked after everything else is rendered. To see what kind of flexibility this API provides, lets take a look at the following renderlet used in Nasdaq example.

yearlyBubbleChart.renderlet(function(chart){

chart.selectAll("circle.bubble").attr("fill", "green");

});

This simple renderlet basically changes all bubbles in the bubble chart to green. Obviously you can do something a lot more complicate then this for example maybe encode another dimension of information into the coloring of the bubbles.

Image may be NSFW.
Clik here to view.



Viewing latest article 3
Browse Latest Browse All 43

Trending Articles