Skip to content

UseFrequencyRulerOptions

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