Function: chart-sort
chart-sort is a byte-compiled function defined in chart.el.gz.
Signature
(chart-sort ARG &rest ARGS)
Implementations
(chart-sort (C chart) PRED) in `chart.el'.
Sort the data in chart C using predicate PRED. See `chart-sort-matchlist' for more details.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/chart.el.gz
(cl-defmethod chart-sort ((c chart) pred)
"Sort the data in chart C using predicate PRED.
See `chart-sort-matchlist' for more details."
(let* ((sl (oref c sequences))
(s1 (car sl))
(s2 (car (cdr sl)))
(s nil))
(if (stringp (car (oref s1 data)))
(progn
(chart-sort-matchlist s1 s2 pred)
(setq s (oref s1 data)))
(if (stringp (car (oref s2 data)))
(progn
(chart-sort-matchlist s2 s1 pred)
(setq s (oref s2 data)))
(error "Sorting of chart %s not supported" (eieio-object-name c))))
(if (eq (oref c direction) 'horizontal)
(oset (oref c y-axis) items s)
(oset (oref c x-axis) items s)
))
)