Skip to content

Interface: IndicatorTraceGaugeAxis ​

The gauge axis: its range, ticks and tick labels.

Properties ​

PropertyTypeDefault valueDescription
dtick?unknownundefinedTick step. Linear axes: a positive number. Log axes: an integer n (a tick every n decades), L<f> (linear steps of f in data units, e.g. L0.5), D1 (every digit) or D2 (1, 2 and 5). Date axes: milliseconds, or M<n> for n months (M12 for years).
exponentformat?"none" | "e" | "E" | "power" | "SI" | "B""B"How large and small numbers are written: none (1000000), e (1e+6), E (1E+6), power (1×10⁶), SI (1M), B (like SI but 1B for 10⁹).
minexponent?number3Smallest decimal exponent written in exponent form (SI/B and exponent formats); smaller magnitudes are written out in full. Minimum: 0
nticks?number0Maximum number of ticks for tickmode: auto (the actual number may be lower so steps stay round). 0 picks it from the axis length. Minimum: 0
range?readonly unknown[]undefinedValues at the start and end of the gauge; a null end keeps its default. Default [0, 1.5 × value].
separatethousands?booleanfalseAlways separate thousands (1,000). By default only numbers with 5 or more integer digits are separated.
showexponent?"all" | "none" | "first" | "last""all"Which tick labels show the exponent.
showticklabels?booleantrueShow tick labels.
showtickprefix?"all" | "none" | "first" | "last""all"Which tick labels get tickprefix.
showticksuffix?"all" | "none" | "first" | "last""all"Which tick labels get ticksuffix.
tick0?unknownundefinedPosition of one tick for tickmode: linear (data units; a date on date axes, an exponent on log axes unless dtick is L<f>). Defaults to 0, or 2000-01-01 on date axes.
tickangle?number | "auto""auto"Tick-label rotation in degrees. auto rotates x-axis labels by the first autotickangles entry that avoids overlap.
tickcolor?string"#444"Tick color.
tickfont?IndicatorTraceGaugeAxisTickfontundefinedTick-label font. Defaults to layout.font.
tickformat?string""Tick-label format: a d3-format specifier for numbers (.2f, ~s, $,) or a d3-time-format specifier for dates (%b %Y), plus %{n}f for n digits of fractional seconds and %h for the half year. Empty picks a format automatically.
tickformatstops?readonly IndicatorTraceGaugeAxisTickformatstop[]undefinedZoom-dependent tick formats: the first enabled stop whose dtickrange contains the current tick step replaces tickformat.
ticklabelstep?number1Label every n-th tick only (tickmode auto and linear). Minimum: 1
ticklen?number5Tick length in px. Minimum: 0
tickmode?"auto" | "linear" | "array"undefinedauto picks up to nticks round ticks; linear places ticks from tick0 every dtick; array uses tickvals/ticktext. Defaults to array when tickvals is set, linear when dtick is set, else auto.
tickprefix?string""Text before each tick label.
ticks?"" | "inside" | "outside""outside"Draw tick marks outside or inside the gauge, or not at all ('').
ticksuffix?string""Text after each tick label.
ticktext?DataColumnundefinedTick labels for tickvals. Missing entries are formatted as usual.
tickvals?DataColumnundefinedTick positions for tickmode: array (data units).
tickwidth?number1Tick width in px. Minimum: 0
visible?booleantrueShow the axis ticks and tick labels.

Released under the MIT License.