Description
{ layers: [ // Histogram with 10 bins, rendering sum / 100 // "{XXX}" is a shortcut to execute XXX in a // js environment with a row's values // bound to variables with the corresponding attribute names. { geom:{ type: "rect", aes: { y: "{total/10}" } }, stat: "bin" }, // Boxplot collected into 4 bins { geom: "boxplot", aes: { x: floor500, group: { color: floor500, opacity: 0.5 } }, stat: "boxplot" }, // Smoothed line, grouped and colored by "g" attribute // Lines are custom colored and thick { geom: "line", aes: { group: {color: "g", "stroke-width": 2} }, stat: { type:"loess", bandwidth: 0.3 }, scales: { stroke: { type: "color", range: ["black", "red", "green"] } } }, // Render the raw data as a stacked line graph { geom: "line", aes: { group: { color: "g", "stroke-opacity": 0.2 } }, pos: "stack" } ] , // place the common aesthetic mappings here aes: { x: "d", y: "e" }, scales: {"stroke-opacity": "identity", "fill-opacity": "identity"}, opts: { width: 900, height: 500, title: "Multi-layer faceted example" }, facets: {x: "f"} };