Search

Time Bar Props

Controls animations on the Time Bar.

boolean default: true

If true, animates changes.

number default: 250

The total duration in milliseconds in which animations should run.

If the Time Bar receives a className, it will not apply any default styles. We recommend styling the Time Bar's parent element, rather than passing a className to the Time Bar itself.

array of objects

Highlights a time or range of times in the Time Bar using the color defined in the highlightColor option.

<TimeBar
  highlight={[
    new Date(),
    {
      start: Date.now() + 1000 * 60 * 60,
      end: Date.now() + 3 * 1000 * 60 * 60
    }
  ]}
/>

end

required
number | Date

The end of the range.

start

required
number | Date

The start of the range.

[id: string]: Node | Link

An indexed list of all the items in the Time Bar. Each item must have a times property. See the Item data format.

Value

An object describing a node or link.

'smooth' | 'histogram' default: 'histogram'

Sets the display mode of the Time Bar to show histogram bars, or a smooth line with shaded area.

object

Specifies options on the Time Bar. See Time Bar Options.

boolean default: false

Indicates whether the Time Bar is playing.

object

Specifies the visible range of the Time Bar.

end

required
number | Date

The end of the range.

start

required
number | Date

The start of the range.

[id: string]: boolean

Draws a selection line for items with truthy values in the supplied object, or multiple lines if multiple objects are supplied in an array. The maximum number of selection lines is 3.

<TimeBar
  items={items}
  selection={[{ node1: true }, { node2: true }]}
/>

Value

A truthy value indicates that an item should be included in the selection line.

string | array of strings default: 'sunset red', 'dark green' and 'orange'

Indicates the colors to use for any selection lines drawn.

<TimeBar
  items={items}
  selection={[{ node1: true }, { node2: true }]}
  selectionColor={["blue", "red"]}
/>
object

Standard styling properties for the element. We recommend styling the Time Bar's parent element, not the Time Bar itself. Default is:

{
  position: 'relative',
  height: '100%',
  minHeight: '100px',
  width: '100%',
}

Terms of use

These terms do not alter or supersede any existing agreements between you (or your employer) and us.

By accessing or using any Content you agree to be bound by these Terms of Use. Please review these terms carefully before using the website.

The contents of this website, including but not limited to any text, code samples, API references, schemas, interactive tools, and other materials (collectively, the 'Content'), are made available for informational and internal evaluation purposes only. All intellectual property rights in the Content are reserved. No licence is granted to use the Content for any commercial purpose, or to copy, distribute, modify, reverse-engineer, or incorporate any part of the Content into any product or service, without our prior written consent.

This Content is provided “as is” and “as available,” without any representations, warranties, or guarantees of any kind, whether express or implied, including but not limited to implied warranties of merchantability, fitness for a particular purpose, non-infringement, or accuracy. To the fullest extent permitted by applicable law, we expressly exclude and disclaim all implied warranties, conditions, and other terms that might otherwise be implied.

We disclaim all liability for any loss or damage, whether direct, indirect, incidental, consequential, or otherwise, arising from any reliance placed on the Content or from your use of it, to the fullest extent permitted by applicable law. By continuing to access or use the Content, you acknowledge and agree to these terms.