Skip to content

FrequencyRulerConfig

type FrequencyRulerConfig = object;
PropertyTypeDescription
autoRender?booleanWhether to automatically re-render when viewport or configuration changes. Default true
autoResize?booleanWhether to automatically resize canvas pixel resolution when container dimensions change. Default true
backgroundColor?stringCanvas background fill color. Default "transparent"
color?stringPrimary color for axis lines, tick marks, and text labels. Default "#a0a0a0"
devicePixelRatio?boolean | numberDevice pixel ratio scaling factor for HiDPI/Retina displays. Default window.devicePixelRatio
font?stringCSS font specification for frequency labels. Default "10px monospace"
frequencyFormat?FrequencyFormatModeFrequency 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?FrequencyScaleFrequency scale mapping: linear, mel, or logarithmic. Default inherits from Sonoscope viewport scale
labelColor?stringSpecific color override for text labels. Default color
minMajorPixelSpacing?numberMinimum pixel spacing between adjacent major frequency labels. Default 45
renderer?| FrequencyRulerRendererName | FrequencyRulerRendererVisual renderer: standard tick lines or segmented boxes. Default "ticks"
tickColor?stringSpecific color override for tick lines. Default color
tickPosition?"left" | "right" | "both" | "inside"Tick mark position relative to the vertical ruler axis. Default "left"