-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
awb99
committed
Nov 14, 2024
1 parent
a7cfd7e
commit 4ab8328
Showing
10 changed files
with
161 additions
and
2 deletions.
There are no files selected for viewing
70 changes: 70 additions & 0 deletions
70
demo/.reval/public/rdocument/demo/notebook/highchart/notebook.edn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
; saved on 2024-11-13 20:12:46 | ||
{:content [{:out "", | ||
:id :90462a03-7ab2-416d-bd44-b5ccca925e5b, | ||
:code "(ns demo.notebook.highchart\n (:require\n [tablecloth.api :as tc]\n [rtable.plot :as plot]\n [demo.random-bars :refer [random-bar-ds]]\n [demo.env :refer [env]]))", | ||
:ns "demo.notebook.highchart", | ||
:result ^{:dali true} | ||
{:viewer-fn dali.viewer.hiccup/hiccup, | ||
:data [:span | ||
{:style {:color "grey"}} | ||
"nil"]}} | ||
{:out "", | ||
:id :7b4ebe3c-cdae-4657-8073-155cb020ef01, | ||
:code "(def ds\n (random-bar-ds 100))", | ||
:ns "demo.notebook.highchart", | ||
:result ^{:dali true} | ||
{:viewer-fn dali.viewer.hiccup/hiccup, | ||
:data [:span | ||
{:style {:color "deeppink"}} | ||
"#'demo.notebook.highchart/ds"]}} | ||
{:out "2024-11-14T01:12:46.765855115Z INFO LOG nuc12 dali.store.file(23,7) - writing .data/public/dali/MIh5U.transit-json\n", | ||
:id :085b427d-07d2-4e01-89cf-1bf2a0d35333, | ||
:code "(plot/highstock-ds\n env {:style {:width \"600px\"\n :height \"300px\"}\n :charts [{:close {:type :line}\n :bar {:type :ohlc\n :mode :candle}}\n {:volume :column}]}\n ds)", | ||
:ns "demo.notebook.highchart", | ||
:result ^{:dali true} | ||
{:viewer-fn rtable.viewer.highcharts/highstock, | ||
:transform-fn rtable.transform.highcharts/load-and-transform-highcharts, | ||
:data {:style {:width "600px", | ||
:height "300px"}, | ||
:class "", | ||
:charts [{:close {:type :line}, | ||
:bar {:type :ohlc, | ||
:mode :candle}} | ||
{:volume :column}], | ||
:load {:id "MIh5U", | ||
:url "/r/dali/MIh5U.transit-json", | ||
:filename "MIh5U.transit-json", | ||
:fmt "transit-json"}}}} | ||
{:out "", | ||
:id :319f226f-1dbd-42b8-a569-0c3a820b22d4, | ||
:code "(def ds-step\n (tc/add-column\n ds\n :ind\n (map-indexed (fn [idx p]\n (cond\n (and (> idx 20) (< idx 40))\n nil\n :else\n (- p 2.5))) (:close ds))))", | ||
:ns "demo.notebook.highchart", | ||
:result ^{:dali true} | ||
{:viewer-fn dali.viewer.hiccup/hiccup, | ||
:data [:span | ||
{:style {:color "deeppink"}} | ||
"#'demo.notebook.highchart/ds-step"]}} | ||
{:out "2024-11-14T01:12:46.771741436Z INFO LOG nuc12 dali.store.file(23,7) - writing .data/public/dali/gUK4_.transit-json\n", | ||
:id :da38af2c-fe86-4967-a5c3-6aa054affdfa, | ||
:code "(plot/highstock-ds\n env {:style {:width \"600px\"\n :height \"300px\"}\n :charts [{:bar {:type :ohlc\n :mode :candle}\n :ind {:type :step\n :color \"red\"}}\n {:volume :column}]}\n ds-step)", | ||
:ns "demo.notebook.highchart", | ||
:result ^{:dali true} | ||
{:viewer-fn rtable.viewer.highcharts/highstock, | ||
:transform-fn rtable.transform.highcharts/load-and-transform-highcharts, | ||
:data {:style {:width "600px", | ||
:height "300px"}, | ||
:class "", | ||
:charts [{:bar {:type :ohlc, | ||
:mode :candle}, | ||
:ind {:type :step, | ||
:color "red"}} | ||
{:volume :column}], | ||
:load {:id "gUK4_", | ||
:url "/r/dali/gUK4_.transit-json", | ||
:filename "gUK4_.transit-json", | ||
:fmt "transit-json"}}}}], | ||
:meta {:id :d3f16459-5931-4ae4-9002-1ff8314fa2eb, | ||
:eval-time "2024-11-14T01:12:46.773502487Z", | ||
:ns "demo.notebook.highchart", | ||
:java "19.0.2", | ||
:clojure "1.11.1"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{:study (), :demo ({:nbns "demo.notebook.highchart", :ext "clj", :path "/home/florian/repo/pink-gorilla/dali-table/demo/src/demo/notebook/highchart.clj"} {:nbns "demo.notebook.highlightjs", :ext "clj"} {:nbns "demo.notebook.ajax", :ext "cljs"} {:nbns "demo.notebook.clojure-edn", :ext "cljs"} {:nbns "demo.notebook.clojure-string", :ext "cljs"} {:nbns "demo.notebook.dialog", :ext "cljs"} {:nbns "demo.notebook.fonts", :ext "cljs"} {:nbns "demo.notebook.frisk", :ext "cljs"} {:nbns "demo.notebook.goog-string", :ext "cljs"} {:nbns "demo.notebook.javelin", :ext "cljs"} {:nbns "demo.notebook.jsinterop", :ext "cljs"} {:nbns "demo.notebook.notify", :ext "cljs"} {:nbns "demo.notebook.page-nav", :ext "cljs"} {:nbns "demo.notebook.pprint", :ext "cljs"} {:nbns "demo.notebook.promesa", :ext "cljs"} {:nbns "demo.notebook.tailwind", :ext "cljs"})} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{:meta {:ns "welcome"}, :content [{:code "(println \"Welcome to Notebook Viewer \")", :result {:viewer-fn dali.viewer.hiccup/hiccup, :data [:h1.text-blue-800 "Welcome to Notebook Viewer!"]}, :out "Welcome to Notebook Viewer"}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{:reval {:rdocument {:fpath ".reval/public/rdocument" | ||
:rpath "/r/rdocument"} | ||
:collections {:study {:clj "quanta/notebook/study/"} | ||
:demo {:clj "demo/notebook/" ; embedded notebooks in jars. | ||
:cljs "demo/notebook/"}}} | ||
|
||
|
||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
(ns demo.notebook.highchart | ||
(:require | ||
[tablecloth.api :as tc] | ||
[rtable.plot :as plot] | ||
[demo.random-bars :refer [random-bar-ds]] | ||
[demo.env :refer [env]])) | ||
|
||
|
||
(def ds | ||
(random-bar-ds 100)) | ||
|
||
|
||
(plot/highstock-ds | ||
env {:style {:width "600px" | ||
:height "300px"} | ||
:charts [{:close {:type :line} | ||
:bar {:type :ohlc | ||
:mode :candle}} | ||
{:volume :column}]} | ||
ds) | ||
|
||
|
||
|
||
(def ds-step | ||
(tc/add-column | ||
ds | ||
:ind | ||
(map-indexed (fn [idx p] | ||
(cond | ||
(and (> idx 20) (< idx 40)) | ||
nil | ||
:else | ||
(- p 2.5))) (:close ds)))) | ||
|
||
(plot/highstock-ds | ||
env {:style {:width "600px" | ||
:height "300px"} | ||
:charts [{:bar {:type :ohlc | ||
:mode :candle} | ||
:ind {:type :step | ||
:color "red"}} | ||
{:volume :column}]} | ||
ds-step) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
(ns rtable.plot | ||
(:require | ||
[potemkin :refer [import-vars]] | ||
[rtable.plot.aggrid] | ||
[rtable.plot.cheetah] | ||
[rtable.plot.highcharts] | ||
[rtable.plot.pixi] | ||
[rtable.plot.rtable] | ||
[rtable.plot.vega])) | ||
|
||
(import-vars | ||
rtable.plot.aggrid/aggrid-ds | ||
rtable.plot.cheetah/cheetah-ds | ||
rtable.plot.highcharts/highstock-ds | ||
rtable.plot.pixi/pixi-ds | ||
rtable.plot.rtable/rtable-ds | ||
rtable.plot.rtable/rtable | ||
rtable.plot.vega/vegalite | ||
rtable.plot.vega/vegalite-ds | ||
rtable.plot.vega/vega) | ||
|