cljfx

https://github.com/cljfx/cljfx
2020-09-29T18:40:41.012900Z

I have a XYChart with a line on it and i want to highlight the rightmost value of the line on the Y axis, how do I do something like this in FX? I realize this is probably kind of advanced and will require manually just drawing a shape on the screen. Any tips for doing stuff like that? If I have a shape, how do I "put it in the axis"? Here's what I'm looking to do:

2020-09-29T18:42:00.013200Z

I know this might not be very cljfx specific, hope it's ok to post some more general javafx stuff here, otherwise I can delete

2020-09-29T18:43:34.013400Z

Although, I am also specifically wondering how do do this in cljfx 🙂

vlaaad 2020-09-29T19:03:34.013600Z

hmm, don't really know, the closest thing I have in mind is showing the number on a data point itself:

{:fx/type :line-chart
 :x-axis {:fx/type :number-axis}
 :y-axis {:fx/type :number-axis}
 :data [{:fx/type :xy-chart-series
         :data
         (let [data (->> 0
                         (iterate #(-> % (+ (rand)) (- 0.5)))
                         (take 50)
                         (map-indexed vector))]
           (concat
             (->> data
                  butlast
                  (map (fn [[i n]]
                         {:fx/type :xy-chart-data
                          :x-value i
                          :y-value n})))
             [(let [[i n] (last data)]
                {:fx/type :xy-chart-data
                 :node {:fx/type :label
                        :style {:-fx-font-size 10}
                        :text (format "%.2f" n)}
                 :x-value i
                 :y-value n})]))}]}

vlaaad 2020-09-29T19:04:24.013800Z

2020-09-29T19:06:18.014200Z

cool, that should be good enough, thanks!!

bartuka 2020-09-29T23:54:25.015700Z

hi, I am trying to produce an AOT compiled artifact from a project using cljfx and I read in the readme that I need to call javafx.application.Platform/exit after compiling the files

bartuka 2020-09-29T23:54:50.016200Z

I am using leiningen and could not find a good way to do that

bartuka 2020-09-29T23:54:59.016400Z

do you have any hints?