Fork me on GitHub

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:


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


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


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
         (let [data (->> 0
                         (iterate #(-> % (+ (rand)) (- 0.5)))
                         (take 50)
                         (map-indexed vector))]
             (->> data
                  (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})]))}]}


cool, that should be good enough, thanks!!


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


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


do you have any hints?