   {:label PieStyler$AnnotationType/Label
    :label-and-percentage PieStyler$AnnotationType/LabelAndPercentage
    :percentage PieStyler$AnnotationType/Percentage})
+
+(def category-render-styles
+  {:area CategorySeries$CategorySeriesRenderStyle/Area
+   :bar CategorySeries$CategorySeriesRenderStyle/Bar
+   :line CategorySeries$CategorySeriesRenderStyle/Line
+   :scatter CategorySeries$CategorySeriesRenderStyle/Scatter
+   :stick CategorySeries$CategorySeriesRenderStyle/Stick})
+
 
 (def text-alignments
   {:centre Styler$TextAlignment/Centre

     x-axis (set-x-axis-style! x-axis)
     y-axis (set-y-axis-style! y-axis))))

;; TODO: Add in font as a shortcut to set all fonts not yet set.

(defn xy-chart

   {:pre [series]}
   (let [chart (XYChart. width height)]
     (doseq [[s-name data] series]
       (let [render-style (-> data :style :render-style)]
         (doto-cond (add-series chart s-name data)
          render-style (.setXYSeriesRenderStyle (xy-render-styles render-style)))))
     (doto-cond
      (.getStyler chart)
      theme (.setTheme (themes theme theme))
      render-style (.setDefaultSeriesRenderStyle (xy-render-styles render-style)))
     (doto (.getStyler chart)
       (set-default-style! styling)
       (set-axes-style! styling))
     (doto-cond
      chart
      title (.setTitle title)))))

(defn category-chart
  "Returns a category chart"
  ([series]
   (category-chart series {}))
  ([series
    {:keys [width height title theme render-style available-space-fill overlap?]
     :or {width 640 height 500}
     :as styling}]
   {:pre [series]}
   (let [chart (CategoryChart. width height)]
     (doseq [[s-name data] series]
       (let [render-style (-> data :style :render-style)]
         (doto-cond (add-series chart s-name data)
          render-style (.setChartCategorySeriesRenderStyle
                        (category-render-styles render-style)))))
     (doto-cond
      (.getStyler chart)
      theme (.setTheme (themes theme theme))
      render-style (.setDefaultSeriesRenderStyle (category-render-styles render-style))
      available-space-fill (.setAvailableSpaceFill (double available-space-fill))
      (not (nil? overlap?))  (.setOverlapped (boolean overlap?)))
     (doto (.getStyler chart)
       (set-default-style! styling)
       (set-axes-style! styling))
