Skip to content

Interface: BarCalc ​

Experimental

Bar calcdata. Index-aligned typed arrays, one entry per bar.

Properties ​

PropertyModifierTypeDescription
barspublicStackOutputExperimental Layout and stacking result (updated by crossTraceCalc).
basereadonlyFloat64ArrayExperimental User base per bar (calc space), 0 where unset.
endspublicobjectExperimental Bar ends (x, y linear): where error bars attach (center of the bar's far edge).
ends.xpublicFloat64Array-
ends.ypublicFloat64Array-
errorXpublicErrorBarCalc | undefinedExperimental Error bars along x and y, at the bar ends (after stacking, as in Plotly).
errorYpublicErrorBarCalc | undefinedExperimental
floorpublicbooleanExperimental Some bar starts at -Infinity (log axis without a positive base): draw it from the axis floor.
hasBasereadonlyUint8ArrayExperimental 1 where the user set a base for that bar.
lengthreadonlynumberExperimental
minSpacing?readonlynumberExperimental A minimum position spacing (Plotly's width1): a histogram collapsed to one bin knows its bin width, which then sizes the bars. Unset for bars.
orientationreadonly"v" | "h"Experimental
overlayAlone?readonlybooleanExperimental In overlay mode, lay this trace out on its own, with its own position spacing (Plotly lays out every overlaid trace alone): overlaid histograms keep their own bin widths. Unset for bars, which share one layout.
period?readonlyobjectExperimental With xperiod (yperiod for horizontal bars): the period of each bar on the position axis (linear), which pos is aligned within. Hover along that axis catches a bar over its period (Plotly's bar/hover.js). Unset without a period.
period.endsreadonlyFloat64Array-
period.startsreadonlyFloat64Array-
posreadonlyFloat64ArrayExperimental Positions (linear coordinates of the position axis); NaN where a bar cannot be placed.
positionValues?readonlyArrayLike<unknown>Experimental The position of each bar as label and template value (%{label}, %{x}), when it is not the trace's position coordinate: a histogram's bin centers (calc space). Unset for bars.
posTypereadonlyAxisType | undefinedExperimental Position-axis type, when known.
s0publicFloat64ArrayExperimental Bar start / end on the size axis, linear. -Infinity: starts below a log axis.
s1publicFloat64ArrayExperimental
sizereadonlyFloat64ArrayExperimental Lengths in calc space of the size axis (ms on date axes, raw values on log axes).
sizeTypereadonlyAxisType | undefinedExperimental Size-axis type, when known.

Released under the MIT License.