Skip to content

Commit

Permalink
highcharts-more dep added (arearange)
Browse files Browse the repository at this point in the history
  • Loading branch information
awb99 committed Mar 9, 2024
1 parent d3390e3 commit 44aec26
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion demo/demo/spec.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,6 @@
:series
[{:name "Installation" :data [439 523 577 698 931 1131 1333 1175]}
{:name "Manufacturing" :data [249 244 292 291 390 302 381 404]}
{:name "Sales & Distribution" :data [117 172 165 191 285 247 321 393]}]}))
{:name "Sales & Distribution" :data [117 172 165 191 285 247 321 393]}
{:name "range" :data [[100 320] [120 350] [160 370] [180 395] [280 490] [240 560] [300 430] [390 600]] :type "arearange"}
]}))
8 changes: 7 additions & 1 deletion src/ui/highcharts.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
(:require
;["highcharts" :as highcharts] ; highstock includes highcharts
["highcharts/highstock" :as highcharts] ; this brings highstock and highcharts
["highcharts/highcharts-more" :as more]
["highcharts/modules/annotations" :as annotations] ; annotation module
["highcharts/modules/boost" :as boost]
["highcharts/modules/debugger" :as debugger]
Expand Down Expand Up @@ -40,14 +41,19 @@
(println "adding highcharts debugger feature..")
(debugger highcharts))

(defn add-more []
(println "adding highcharts more feature..")
(more highcharts))

(defonce loaded? (atom false))

(defn ensure-extensions-loaded []
(when-not @loaded?
(reset! loaded? true)
(add-debugger)
(add-boost)
(add-annotations)))
(add-annotations)
(add-more)))

(defn render-highchart [dom-node data]
(ensure-extensions-loaded)
Expand Down

0 comments on commit 44aec26

Please sign in to comment.