Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix for #294

commit 606a3b32e7c44a32241f55ca189ed38037854c92 1 parent 88bd28d
@Gerrrr Gerrrr authored
Showing with 12 additions and 4 deletions.
  1. +12 −4 modules/incanter-charts/src/incanter/charts.clj
View
16 modules/incanter-charts/src/incanter/charts.clj
@@ -1137,11 +1137,19 @@
_group-by (when (:group-by opts)
(data-as-list (:group-by opts) data))
x-groups (when _group-by
- (map #($ :col-0 %)
- (vals ($group-by :col-1 (conj-cols _x _group-by)))))
+ (let [x-groupped (->> (conj-cols _x _group-by)
+ ($group-by :col-1))]
+ (->> (distinct _group-by)
+ (map #(->>
+ (get x-groupped {:col-1 %})
+ ($ :col-0))))))
y-groups (when _group-by
- (map #($ :col-0 %)
- (vals ($group-by :col-1 (conj-cols _y _group-by)))))
+ (let [y-groupped (->> (conj-cols _y _group-by)
+ ($group-by :col-1))]
+ (->> (distinct _group-by)
+ (map #(->>
+ (get y-groupped {:col-1 %})
+ ($ :col-0))))))
__x (in-coll (if x-groups (first x-groups) _x))
__y (in-coll (if y-groups (first y-groups) _y))
title (or (:title opts) "")
Please sign in to comment.
Something went wrong with that request. Please try again.