Skip to content

Interface: TimelineFigureOptions ​

Options of timeline: the camelCase counterparts of px.timeline's parameters.

Properties ​

PropertyModifierTypeDescription
categoryOrders?readonlyReadonly<Record<string, readonly unknown[]>>Value orders per column, e.g. { Resource: ['Ana', 'Ben'] } orders the traces and legend, { Task: [...] } the rows. Values not listed follow in order of first appearance. Rows listed for y are kept even without a bar, so rows of other traces (milestones) can be placed too.
color?readonlystringColumn to group by: one trace (and legend item) per distinct value.
colorDiscreteMap?readonlyReadonly<Record<string, string>>Fixed colors per color value. Other values take colorDiscreteSequence, else the colorway.
colorDiscreteSequence?readonlyreadonly string[]Colors for color values in order. Default: the template's colorway (no marker.color).
datareadonlyTimelineDataThe table: an array of row objects, or an object of equally long columns.
hoverData?readonlyreadonly string[]Extra columns listed in the hover label (through customdata).
hoverName?readonlystringColumn shown in bold at the top of the hover label.
labels?readonlyReadonly<Record<string, string>>Display names of columns, for hover lines, the legend title and the y axis title.
opacity?readonlynumberBar opacity (marker.opacity), 0–1.
reverseY?readonlybooleanList rows top-down, the first row (or the first entry of categoryOrders[y]) at the top, as Gantt charts read. Default true; false keeps Plotly's bottom-up category order.
text?readonlystringColumn of labels drawn on the bars (textposition: 'auto').
title?readonlystringFigure title.
xEndreadonlystringColumn of end dates.
xStartreadonlystringColumn of start dates (date strings, Dates or ms since the epoch).
yreadonlystringColumn of row labels (tasks): the categories of the y axis.

Released under the MIT License.