README.org

October 27, 2021 ยท View on GitHub

[[https://clojars.org/re-echarts][https://clojars.org/re-echarts/latest-version.svg]]

[[https://www.npmjs.com/package/echarts][https://img.shields.io/npm/v/echarts.svg]]

Example project: [[./example]]

#+begin_src clojure (ns starter.browser (:require [reagent.dom :as rdom] [re-echarts.core :refer [ECharts]]))

(defn myechart [] [:> ECharts {:style {:width "800px" :height "600px"} :theme "dark" :option {:title {:text "Echarts is here"} :dataset {:dimention [:Week :Value] :source [{:Week "Mon" :Value 820} {:Week "Tue" :Value 932} {:Week "Wed" :Value 901} {:Week "Thu" :Value 934} {:Week "Fri" :Value 1220} {:Week "Sat" :Value 820} {:Week "Sun" :Value 990}]} :xAxis {:type "category"} :yAxis {:type "value"} :series [{:type "line" :smooth true}]}}])

(defn ^:dev/after-load start [] (js/console.log "start") (rdom/render [#'myechart] (.getElementById js/document "app")))

(defn ^:export init [] (js/console.log "init") (start))

(defn ^:dev/before-load stop [] (js/console.log "stop")) #+end_src

  • Deps: