(add-bubble-series! chart s-name data)
Adds an additional bubble series to the provided bubble chart. It is preferable to provide all series upfront instead of mutating the underlying chart. For other chart types, see the add-series! function.
Adds an additional bubble series to the provided bubble chart. It is preferable to provide all series upfront instead of mutating the underlying chart. For other chart types, see the add-series! function.
(add-series! chart s-name data)
Adds an XY or category series to an already existing chart. It is preferable to provide all series upfront to avoid mutable operations on a chart.
For bubble-charts, use add-bubble-series!
. For pie charts, just use
(.addSeries chart name val).
Adds an XY or category series to an already existing chart. It is preferable to provide all series upfront to avoid mutable operations on a chart. For bubble-charts, use `add-bubble-series!`. For pie charts, just use (.addSeries chart name val).
(as-buffered-image chart)
Converts a chart into a java.awt.image.BufferedImage.
Converts a chart into a java.awt.image.BufferedImage.
(bubble-chart* series)
(bubble-chart* series
{:keys [width height title theme render-style]
:or {width 640 height 500}
:as styling})
Returns a raw bubble chart. Bubble charts are hard to make right, so please see the tutorial for more information about how to create one. The render-styles page will give you information about styling options.
Returns a raw bubble chart. Bubble charts are hard to make right, so please see the tutorial for more information about how to create one. The render-styles page will give you information about styling options.
Different render styles for bubble series. For now this is useless, as you can only use :round. Apparently :box is around the corner though.
Different render styles for bubble series. For now this is useless, as you can only use :round. Apparently :box is around the corner though.
(category-chart series)
(category-chart series {:keys [x-axis series-order] :as styling})
Returns a category chart. See the tutorial for more information about how to create category charts, and see the render-styles documentation for styling options.
Returns a category chart. See the tutorial for more information about how to create category charts, and see the render-styles documentation for styling options.
(category-chart* series)
(category-chart* series
{:keys [width height title theme render-style
available-space-fill overlap?]
:or {width 640 height 500}
:as styling})
Returns a raw category chart. Prefer category-chart
unless you
run into performance issues. See the tutorial for more information
about how to create category charts, and see the render-styles
documentation for styling options.
Returns a raw category chart. Prefer `category-chart` unless you run into performance issues. See the tutorial for more information about how to create category charts, and see the render-styles documentation for styling options.
The different styles you can use for category series.
The different styles you can use for category series.
All the default java.awt colors as keywords. You can use this map to iterate over the keys, in case you'd like to compare different colors. Or you could use java.awt.Color directly to use the exact color you want.
All the default java.awt colors as keywords. You can use this map to iterate over the keys, in case you'd like to compare different colors. Or you could use java.awt.Color directly to use the exact color you want.
(extract-series keymap coll)
Transforms coll into a series map by using the values in the provided keymap. There's no requirement to provide :x or :y (or any key at all, for that matter), although that's common.
Example: (extract-series {:x f, :y g, :bubble bubble} coll) == {:x (map f coll), :y (map g coll), :bubble (map bubble coll)}
Transforms coll into a series map by using the values in the provided keymap. There's no requirement to provide :x or :y (or any key at all, for that matter), although that's common. Example: (extract-series {:x f, :y g, :bubble bubble} coll) == {:x (map f coll), :y (map g coll), :bubble (map bubble coll)}
The different legend positions. Note that xchart implements only a subset of inside/outside for the different positions.
The different legend positions. Note that xchart implements only a subset of inside/outside for the different positions.
All the default XChart markers as keywords. To create your own marker, you must subclass the org.knowm.xchart.style.markers.Marker class, so it's often better to use the default ones.
All the default XChart markers as keywords. To create your own marker, you must _subclass_ the org.knowm.xchart.style.markers.Marker class, so it's often better to use the default ones.
The different annotation types you can use to annotate pie charts. By default, this is :percentage.
The different annotation types you can use to annotate pie charts. By default, this is :percentage.
(pie-chart series)
(pie-chart series
{:keys [width height title circular? theme render-style
annotation-distance start-angle draw-all-annotations?
donut-thickness annotation-type]
:or {width 640 height 500}
:as styling})
Returns a pie chart. The series map is in this case just a mapping from string to number. For styling information, see the render-styles page.
Example: (c/pie-chart {"Red" 54 "Green" 34})
Returns a pie chart. The series map is in this case just a mapping from string to number. For styling information, see the render-styles page. Example: (c/pie-chart {"Red" 54 "Green" 34})
The different pie render styles. It is :pie by default.
The different pie render styles. It is :pie by default.
(spit chart fname)
(spit chart fname type)
Spits the chart to the given filename. If no type is provided, the type is guessed by the filename extension. If no extension is found, an error is raised.
Spits the chart to the given filename. If no type is provided, the type is guessed by the filename extension. If no extension is found, an error is raised.
The default stroke types provided by XChart. You can also use a self-made stroke if you're not happy with any of the predefined ones.
The default stroke types provided by XChart. You can also use a self-made stroke if you're not happy with any of the predefined ones.
The different kinds of text alignments you can use.
The different kinds of text alignments you can use.
The different default themes you can use with xchart.
The different default themes you can use with xchart.
(to-bytes chart type)
Converts a chart into a byte array.
Converts a chart into a byte array.
(transpose-map series)
Transforms a map of maps such that the inner keys and outer keys are flipped.
That is, (get-in m [k1 k2])
= (get-in (transpose-map m) [k2 k1])
. The
inner values remain the same.
Transforms a map of maps such that the inner keys and outer keys are flipped. That is, `(get-in m [k1 k2])` = `(get-in (transpose-map m) [k2 k1])`. The inner values remain the same.
(view & charts)
Utility function to render one or more charts in a swing frame.
Utility function to render one or more charts in a swing frame.
(xy-chart series)
(xy-chart series
{:keys [width height title theme render-style]
:or {width 640 height 500}
:as styling})
Returns an xy-chart. See the tutorial for more information about how to create an xy-chart, and see the render-styles documentation for styling options.
Returns an xy-chart. See the tutorial for more information about how to create an xy-chart, and see the render-styles documentation for styling options.
The different xy-render styles: :area, :scatter and :line.
The different xy-render styles: :area, :scatter and :line.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close