FrequencyRulerConfig
type FrequencyRulerConfig = object;Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
autoRender? | boolean | Whether to automatically re-render when viewport or configuration changes. Default true |
autoResize? | boolean | Whether to automatically resize canvas pixel resolution when container dimensions change. Default true |
backgroundColor? | string | Canvas background fill color. Default "transparent" |
color? | string | Primary color for axis lines, tick marks, and text labels. Default "#a0a0a0" |
devicePixelRatio? | boolean | number | Device pixel ratio scaling factor for HiDPI/Retina displays. Default window.devicePixelRatio |
font? | string | CSS font specification for frequency labels. Default "10px monospace" |
frequencyFormat? | FrequencyFormatMode | Frequency label formatting mode. - “auto”: Switches between Hz and kHz depending on magnitude. - “hz”: Always formats in Hertz (e.g. 2000 Hz). - “khz”: Always formats in kilohertz (e.g. 2.0 kHz). - Custom function (hz: number) => string. Default "auto" |
frequencyScale? | FrequencyScale | Frequency scale mapping: linear, mel, or logarithmic. Default inherits from Sonoscope viewport scale |
labelColor? | string | Specific color override for text labels. Default color |
minMajorPixelSpacing? | number | Minimum pixel spacing between adjacent major frequency labels. Default 45 |
renderer? | | FrequencyRulerRendererName | FrequencyRulerRenderer | Visual renderer: standard tick lines or segmented boxes. Default "ticks" |
tickColor? | string | Specific color override for tick lines. Default color |
tickPosition? | "left" | "right" | "both" | "inside" | Tick mark position relative to the vertical ruler axis. Default "left" |