Skip to content
Browse files

Merge pull request #77 from mknoszlig/issue-76

modify default behavior to set stroke for all series - fixes #76
  • Loading branch information...
2 parents ac72d00 + b21119c commit d5905214cf2ed27f4a580466bc6ba5da63e45e86 @liebke liebke committed May 17, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 modules/incanter-charts/src/incanter/charts.clj
View
8 modules/incanter-charts/src/incanter/charts.clj
@@ -3151,7 +3151,7 @@
"
([chart & options]
(let [{:keys [width dash series dataset cap join]
- :or {width 1.0 dash 1.0 series 0 dataset 0
+ :or {width 1.0 dash 1.0 series :all dataset 0
cap java.awt.BasicStroke/CAP_ROUND
join java.awt.BasicStroke/JOIN_ROUND}} (apply hash-map options)
renderer (-> chart .getPlot (.getRenderer dataset))
@@ -3161,7 +3161,11 @@
1.0
(float-array 1.0 dash)
0.0)]
- (.setSeriesStroke renderer series stroke)
+ (if (= :all series)
+ (doto renderer
+ (.setAutoPopulateSeriesStroke false)
+ (.setBaseStroke stroke))
+ (.setSeriesStroke renderer series stroke))
chart)))

0 comments on commit d590521

Please sign in to comment.
Something went wrong with that request. Please try again.