Skip to content
Giorgio Caviglia edited this page Apr 6, 2014 · 12 revisions

This page aims at collecting some basic principles behind the creation of new charts and models and, more in general behind the use of RAW.

Use only SVG Elements

Since the main goal of RAW is to create visualization easily editable using vector graphic tools (e.g. Adobe Illustrator, Inkscape,...), charts must use only SVG elements. Moreover, in order to include all the styles within the SVG code and allow the users to export exactly what they are looking at in RAW, external CSS styles cannot be used. Every style or attribute declaration has to be explicitly defined in the draw function (i.e. through .style or .attr D3's operators).

Avoid Enter-Update-Exit Pattern

D3's enter-update-exit pattern does not make too much sense within RAW's charts, since the selection is always empty when passed to the draw function. Since RAW is meant to be a tool for the production of non-interactive visualizations, to be elaborated using vector-graphics tools, this should not be perceived as a limitation, but, at the contrary, as a way to simplify charts' drawing code.

Clone this wiki locally