Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kimim/re-echarts
React ECharts for ClojureScript
https://github.com/kimim/re-echarts
Last synced: 6 days ago
JSON representation
React ECharts for ClojureScript
- Host: GitHub
- URL: https://github.com/kimim/re-echarts
- Owner: kimim
- Created: 2021-02-24T09:31:16.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-27T11:54:27.000Z (about 3 years ago)
- Last Synced: 2024-09-17T01:45:30.707Z (about 2 months ago)
- Language: Clojure
- Homepage:
- Size: 11.7 KB
- Stars: 12
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
- awesome-echarts - re-echarts - A clojurescript library to use Apache ECharts, with react/reagent. (Languages / Clojure)
README
[[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:
- https://github.com/thheller/shadow-cljs
- https://clojurescript.org/news/news
- https://github.com/facebook/react
- https://github.com/reagent-project/reagent
- https://github.com/apache/echarts