Skip to content

Commit

Permalink
Add support for stacked category charts, closes #6
Browse files Browse the repository at this point in the history
  • Loading branch information
hypirion committed Oct 25, 2016
1 parent c921a4f commit e823425
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion project.clj
Expand Up @@ -4,7 +4,7 @@
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[org.knowm.xchart/xchart "3.2.0"]]
[org.knowm.xchart/xchart "3.2.1"]]
:source-paths ["src/clj"]
:java-source-paths ["src/java"]
:javac-options ["-Xlint:unchecked"]
Expand Down
6 changes: 4 additions & 2 deletions src/clj/com/hypirion/clj_xchart.clj
Expand Up @@ -436,7 +436,8 @@
([series]
(category-chart* series {}))
([series
{:keys [width height title theme render-style available-space-fill overlap?]
{:keys [width height title theme render-style available-space-fill overlap?
stacked?]
:or {width 640 height 500}
:as styling}]
{:pre [series]}
Expand All @@ -452,7 +453,8 @@
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?)))
(not (nil? overlap?)) (.setOverlapped (boolean overlap?))
(not (nil? stacked?)) (.setStacked (boolean stacked?)))
(doto (.getStyler chart)
(set-default-style! styling)
(set-axes-style! styling))
Expand Down

0 comments on commit e823425

Please sign in to comment.