ClojureScript and Dynamic!? Re-charts
I simply forgot how easy it was to use ClojureScript for charting.
Someone got in touch with me recently to give them an example on how things are again, so here it is.
The data set is an atom, so that eventually the reagent/react reactive rendering framework can be used as its best.
(defonce data (r/atom [ {:name "Page A" :uv 4000 :pv 2400}
{:name "Page B" :uv 3000 :pv 1398}
{:name "Page C" :uv 2000 :pv 9800}
{:name "Page D" :uv 2780 :pv 3908}
{:name "Page E" :uv 1890 :pv 4800}
{:name "Page F" :uv 2390 :pv 3800}
{:name "Page G" :uv 3490 :pv 4300}]))
The chart is a two lines chart, one for the uv series, and one for the pv series.