Database Reference
In-Depth Information
(let [lengths (map #(.-length %) data)
buckets (apply array
(map ->point
(get-buckets
lengths 10)))]
(array (webviz/Group. "Abalone Lengths" buckets))))
6.
It is simple to initialize the chart. We just want a standard multibar chart,
as shown here:
(defn make-chart [] (.multiBarChart (.-models js/nv)))
7.
Creating the chart just involves tying these together with create-chart :
(defn ^:export histogram []
(webviz/create-chart
"/histogram/data.json"
"#histogram svg"
make-chart
data->nv-groups
:transition true))
Now, when we visit http://localhost:3000/histogram , we can see the
following histogram:
 
Search WWH ::




Custom Search