1.2.3-SNAPSHOT permalink Arrow_down_16x16

pie-chart*

incanter.charts

  • (pie-chart* categories values & options)

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source incanter/charts.clj:1994 top

(defn pie-chart*
  ([categories values & options]
     (let [opts (when options (apply assoc {} options))
	   data (:data opts)
	  _values (if (coll? values) (to-list values) ($ values data))
	  _categories (if (coll? categories) (to-list categories) ($ categories data))
           main-title (or (:title opts) "")
	   theme (or (:theme opts) :default)
           legend? (true? (:legend opts))
           dataset (DefaultPieDataset.)
           chart (org.jfree.chart.ChartFactory/createPieChart
                     main-title
		     dataset
		     legend?
                     true
                     false)]
        (do
	  (doseq [i (range 0 (count _values))] 
	    (.setValue dataset (nth _categories i) (nth _values i)))
	  (set-theme chart theme)
	  chart))))
Vars in incanter.charts/pie-chart*: defn doseq let nth
Used in 0 other vars

Comments top

No comments for pie-chart*. Log in to add a comment.