reveal

Docs: https://vlaaad.github.io/reveal/ Source: https://github.com/vlaaad/reveal
Ed 2020-11-23T19:47:07.247600Z

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?

Ed 2020-11-24T14:24:33.249100Z

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 ...

vlaaad 2020-11-24T20:46:16.249300Z

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.

vlaaad 2020-11-24T20:48:57.249500Z

the place that will require change is vlaaad.reveal.view/describe-cell

vlaaad 2020-11-24T20:50:00.249700Z

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 😄

Ed 2020-11-25T18:11:12.250Z

😉 ... 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 ...

Ed 2020-11-25T18:11:53.250200Z

kind of like using grasp, but for the data visualisation 😉

vlaaad 2020-11-26T21:12:58.250700Z

hmm, I like this idea... I'll keep it in mind

Ed 2020-11-27T15:52:47.250900Z

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

Ed 2020-11-27T15:53:21.251100Z

Maybe multiple colours for different criteria?

Ed 2020-11-27T15:56:10.251300Z

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

Ed 2020-11-27T16:00:15.251600Z

But I'm pretty impressed with reveal ... Many thanks for releasing it into the world

vlaaad 2020-11-23T20:39:32.248600Z

Hi! You mean in any kind of table, or in table-view provided by reveal?