-
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 status checks…
docy snippets added
awb99
committed
Nov 23, 2024
1 parent
c913f70
commit 976ec82
Showing
23 changed files
with
364 additions
and
47 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -34,4 +34,5 @@ package-lock.json | |
shadow-cljs.edn | ||
goldly_bindings_generated.cljs | ||
resources/META-INF | ||
.data | ||
.data | ||
demo/.reval/ |
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
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
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,31 @@ | ||
(ns demo.reval-experiment | ||
(:require | ||
[modular.system] | ||
[reval.dali.eval :refer [dali-eval-blocking]])) | ||
|
||
|
||
(def s (modular.system/system :reval)) | ||
|
||
s | ||
|
||
(dali-eval-blocking | ||
s | ||
{:kernel :clj | ||
:code "(ns rtable.snippet.rtable | ||
(:require | ||
[rtable.plot :as plot] | ||
[rtable.snippet.data.random-bars :refer [random-bar-ds]])) | ||
(def ds (random-bar-ds 200)) | ||
(plot/rtable {:class \"table-head-fixed padding-sm table-red table-striped table-hover\" | ||
:style {:width \"50vw\" | ||
:height \"40vh\" | ||
:border \"3px solid green\"} | ||
:columns [{:path :date :format 'ta.viz.lib.format-date/dt-yyyymmdd-hhmm :max-width \"80px\"} | ||
{:path :close :format 'ta.viz.lib.format-number/fmt-nodigits} | ||
{:path :volume}]} | ||
ds)"}) | ||
|
||
|
||
|
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 |
---|---|---|
|
@@ -23,7 +23,3 @@ ListGrid({ | |
|
||
|
||
|
||
todo | ||
- rtable plot in reagent-table. | ||
- highcharts gets the data how? | ||
- move in vega? |
File renamed without changes.
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,23 @@ | ||
(ns rtable.format.format-date | ||
(:require | ||
[tick.helper :refer [dt-format]])) | ||
|
||
(defn dt-yyyymmdd [dt] | ||
;(println "dt-yyyymmdd: " dt) | ||
(if (nil? dt) | ||
"" | ||
(if (string? dt) | ||
dt | ||
(dt-format "YYYY-MM-dd" dt) | ||
;(str dt) | ||
))) | ||
|
||
(defn dt-yyyymmdd-hhmm [dt] | ||
;(println "dt-yyyymmdd: " dt) | ||
(if (nil? dt) | ||
"" | ||
(if (string? dt) | ||
dt | ||
(dt-format "YYYY-MM-dd HH:mm" dt) | ||
;(str dt) | ||
))) |
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,18 @@ | ||
(ns rtable.format.format-number | ||
(:require | ||
[pinkgorilla.goog.string :refer [format]])) | ||
|
||
(defn format-number [sformat nr] | ||
;(println "fmt-nodigits nr: " nr) | ||
;;(js/isNaN nr) | ||
;(= nr ##NaN) | ||
;(to-fixed nr 1) | ||
(if (nil? nr) | ||
"-" | ||
(if (string? nr) | ||
nr | ||
(format "%.0f" nr)))) | ||
|
||
(defn fmt-nodigits [nr] | ||
(format-number "%.0f" nr)) | ||
|
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
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,37 @@ | ||
(ns rtable.snippet.agtable | ||
(:require | ||
[reval.core :refer [*env*]] | ||
[rtable.plot :as plot] | ||
[rtable.snippet.data.random-bars :refer [random-bar-ds]])) | ||
|
||
(def ds (random-bar-ds 200)) | ||
|
||
(def opts | ||
{:style {;:width "800px" :height "600px" | ||
:width "800px" :height "600px" | ||
;:width "100%" :height "100%" | ||
} | ||
:timezone "America/Panama" | ||
:columns [{:field :date} | ||
{:field :open | ||
:cellStyle {:color "red" :background-color "green"} | ||
:resizable true} | ||
{:field :high | ||
:type "rightAligned" | ||
:resizable true | ||
;:valueGetter: p => p.data.athlete | ||
; A Value Getter is a function that gets called for each row to return the Cell Value for a Column. | ||
} | ||
{:field :low :width 70 | ||
:cellClass "shaded-class" | ||
:resizable true} | ||
{:field :close :header "C" :resizable true | ||
;:cellClassRules {"bg-blue-500" (fn [p] | ||
; (println "ccr: " p) | ||
; (nil? (.-value p)))} | ||
} | ||
{:field :volume :width 70 | ||
:resizable true | ||
:cellStyle {:fontWeight "bold"}}]}) | ||
|
||
(plot/aggrid-ds *env* opts ds) |
Oops, something went wrong.