Timeline Customization

Overview

KronoGraph allows you to set up the timeline in many different ways so you can change its look, feel and behavior to suit your requirements and data.

Options

Most timeline settings can be found in TimelineOptions. Pass them to the options method options prop to make the changes.

The timeline below uses the default settings. The examples that follow demonstrate the effect of changing the background color, entity label colors, focus control display, fonts, entity highlight color, scale positions, annotations settings and more.

Timeline customization default example

Show Lens Highlight

When the Lens icon lens control is shown, because there's not enough vertical space to show entity labels, the entities to be magnified in lens view are, by default, highlighted.

To disable the lens highlight, use the showLensHighlight option.

timeline.options({ showLensHighlight: false });
<Timeline
    options={{
      showLensHighlight: false,
    }}
  />

See the Lens story for more information.

Expanded Rows

Usually an entity's timeline is displayed using a single row. If entities have duration events overlapping with instantaneous ones, or events that are close together, it can be helpful to add extra sub-rows to display them more clearly (if there's room).

You can set entity rows to expand using the expandedRows API so that users can zoom in on busy areas and see individual events more clearly, as illustrated:

You can set entity rows to expand using the expandedRows method so that users can zoom in on busy areas and see individual events more clearly, as illustrated:

Timeline customization expanded rows example

Refine how entity rows are expanded using:

  • The expandedRows timeline options allow you to specify display options.

  • The expandedRows object specifies the entities whose rows are to be expanded.

  • The expandedRows event is fired when the set of entities to be expanded changes.

  • The expandedRows prop returns the ids of the entities to be expanded.

To explore further, take a look at the Expanded Rows story.

Entity Label Area Width

By default, KronoGraph adjusts the width of the entity label area automatically to best display the labels in your data. Alternatively, you can set the label area width to a custom value and allow the user to adjust the area width by dragging the area boundary, shown below.

Timeline customization label area example
timeline.labelAreaWidth('fixed', 200);
<Timeline
   labelAreaWidth={{mode: 'fixed', width: 200}}
/>

The width is set in pixels, and can be anywhere between 125px and 80% of the width of the timeline. Any value outside of these limits will be automatically adjusted to be within the limits.

For further details see the labelAreaWidth() API and the Styling the Timeline story.

For further details see the labelAreaWidth() API and the Styling the Timeline story.

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.