Open rqcy opened 8 years ago
Yes, but as of now it requires a lot of Java interop and a solid understanding of the XChart API itself. It's on my list of things to resolve for 1.0, but it's not something I will focus on immediately.
For simple cases you can tweak one of the existing themes by overriding its methods. For example:
(def my-theme
(proxy [org.knowm.xchart.style.GGPlot2Theme] []
(getPlotBackgroundColor [] (Color. 1.0 1.0 1.0))
(getSeriesColors [] (into-array [(Color. 1.0 0.0 0.0)]))))
And then you use that object as a value for the :theme
key.
(c/category-chart
{"Steps" {:x (range 10)
:y (range 10)}}
{:title "Ladder"
:theme my-theme})
Is it possible to define a new theme in Clojure and use it later with :theme keyword?