Function: chart-translate-xpos

chart-translate-xpos is a byte-compiled function defined in chart.el.gz.

Signature

(chart-translate-xpos ARG &rest ARGS)

Implementations

(chart-translate-xpos (C chart) X) in `chart.el'.

Translate in chart C the coordinate X into a screen column.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/chart.el.gz
(cl-defmethod chart-translate-xpos ((c chart) x)
  "Translate in chart C the coordinate X into a screen column."
  (let ((range (oref (oref c x-axis) bounds)))
    (+ (oref c x-margin)
       (round (* (float (- x (car range)))
		 (/ (float (oref c x-width))
		    (float (- (cdr range) (car range))))))))
  )