(domain-x series)Returns [min-x max-x] for numeric x, or category count for category x.
Returns [min-x max-x] for numeric x, or category count for category x.
(domain-y series)Returns [min-y max-y] across all series data points, or [0 1] if empty.
Returns [min-y max-y] across all series data points, or [0 1] if empty.
(find-pts-at-x all-pts mx)For cursor='x': find one point per series closest to mx. all-pts is a flat seq of points with :id and :px keys.
For cursor='x': find one point per series closest to mx. all-pts is a flat seq of points with :id and :px keys.
(format-value v fmt-str)Format a numeric value v using fmt-str spec. fmt-str: nil | "int" | "pct" | "abbr" | "fixed:N" | "raw"
Format a numeric value v using fmt-str spec. fmt-str: nil | "int" | "pct" | "abbr" | "fixed:N" | "raw"
(nice-step span n)Compute a "nice" step size for approximately n ticks over span.
Compute a "nice" step size for approximately n ticks over span.
(normalize {:keys [type-raw data-raw height-raw padding-raw grid-present?
axes-raw tooltip-present? cursor-raw disabled-present?
loading-present? selected-raw x-format-raw y-format-raw]})(parse-bool-attr s)Returns true if attr is present (non-nil) and not literally "false".
Returns true if attr is present (non-nil) and not literally "false".
(parse-cursor s)(parse-int-pos s default-val)Parse a positive integer string, returning default-val on failure.
Parse a positive integer string, returning default-val on failure.
(parse-selected s)Parse selected attr string "seriesId:index" into map, or nil.
Parse selected attr string "seriesId:index" into map, or nil.
(parse-series-data json-str)Parse JSON string into a vector of series maps. Returns [] on error.
Parse JSON string into a vector of series maps. Returns [] on error.
(parse-type s)(ticks-y mn mx n)Returns a vector of ~n nice tick values between mn and mx.
Returns a vector of ~n nice tick values between mn and mx.
(tooltip-position px py tw th W H edge-pad offset)Compute tooltip position with edge-safe flip logic. px/py = cursor position; tw/th = tooltip size; W/H = container size. Returns {:left l :top t}.
Compute tooltip position with edge-safe flip logic.
px/py = cursor position; tw/th = tooltip size; W/H = container size.
Returns {:left l :top t}.(x-kind series)Returns "category" when x values are strings, otherwise "numeric".
Returns "category" when x values are strings, otherwise "numeric".
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |