This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-11-23
Channels
- # aws (3)
- # babashka (17)
- # beginners (44)
- # boot (1)
- # bristol-clojurians (1)
- # cider (19)
- # clj-kondo (7)
- # cljfx (5)
- # clojure (35)
- # clojure-australia (25)
- # clojure-europe (41)
- # clojure-nl (4)
- # clojure-spec (5)
- # clojure-uk (104)
- # clojuredesign-podcast (1)
- # clojurescript (41)
- # component (6)
- # conjure (5)
- # core-async (20)
- # core-logic (5)
- # cryogen (7)
- # cursive (4)
- # data-science (1)
- # datomic (14)
- # devcards (2)
- # events (1)
- # fulcro (6)
- # helix (6)
- # jobs (4)
- # kaocha (4)
- # lambdaisland (4)
- # leiningen (3)
- # luminus (1)
- # malli (2)
- # meander (2)
- # mount (6)
- # off-topic (2)
- # pedestal (25)
- # rdf (1)
- # re-frame (17)
- # reagent (5)
- # releases (1)
- # reveal (13)
- # rewrite-clj (45)
- # shadow-cljs (27)
- # sql (18)
- # tools-deps (93)
- # vim (13)
- # xtdb (11)
Hey. Is it possible to apply some styling to a table cell (for example) based on the results of calling a function. Like highlighting all the negative numbers in red? Or something similar?
I mean in a table view in reveal ... Maybe allowing me to enter a function to call on each row or cell to apply a style? ... Is it something I could do by implementing a custom view? ... I was thinking about it in terms of analysing a large data set, so you could get a quick visual idea of rows some categories in the data ...
In default table view it's not possible, but it's possible to do, although it will require copying most of the reveal's table view source and modifying it.
I tried this to highlight all keywords:
(defn- describe-cell [x]
{:content-display :graphic-only
:style-class "reveal-table-cell"
:style {:-fx-background-color (if (keyword? x) :red :transparent)}
:graphic {:fx/type summary :value x}})
scary, yet indicative 😄😉 ... many thanks ... I'll have a look and see if I can create something ... I think ideally i'd like to be able to input the function from the ui rather than hardcode keyword?
or whatever ...
I was also thinking of trying to implement a graph view of data ... For things like state machines or nodes in a graph ... It'd be really useful to be able to highlight nodes in a graph that match other criteria ... Like people who bought this product also bought these products... And highlight the products over $100 .... Or whatever
I found this https://github.com/brunomnsilva/JavaFXSmartGraph ... But have not tried to go any further, and probably won't have time to for a few weeks at least