SvgBar interface
A bar gauge laid on the box of an element, for createSvgBarRangePath and createSvgBarTicksPath. The bar follows the element in any group, rotated or not.
ts
import type { SvgBar } from 'utils';Signature
ts
export interface SvgBar {
/** The element giving the area of the bar, such as its track `<rect>`. */
readonly element: SVGGraphicsElement;
/** Where the values grow, in the element's own axes: `'up'` fills from the bottom. */
readonly direction: 'down' | 'left' | 'right' | 'up';Tests
Line coverage: 0 %.
Source
src/svg-shape/svg-bar.ts (on GitHub)
Used by
createSvgBarRangePath: Creates thedof the part of a bar between two ratios, across its whole thickness, in any group: the fill level of a bar graph (0 to the value) or a threshold zone.createSvgBarTicksPath: Creates thedof evenly spaced graduations along a bar, in any group:countintervals givecount + 1ticks, across the bar from one of its sides.
Source code
ts
/**
* A bar gauge laid on the box of an element, for `createSvgBarRangePath` and `createSvgBarTicksPath`. The bar follows the element in
* any group, rotated or not.
*/
export interface SvgBar {
/** The element giving the area of the bar, such as its track `<rect>`. */
readonly element: SVGGraphicsElement;
/** Where the values grow, in the element's own axes: `'up'` fills from the bottom. */
readonly direction: 'down' | 'left' | 'right' | 'up';
}Keywords: svg, bar, svg shapes, interface