- API
- KronoGraph
- Data Formats
React
Data Formats
Items in KronoGraph such as entities, events or time series charts are described as plain JavaScript objects whose properties configure the appearance of each item. Events also describe their relationship to other entities. See the Timeline Items Docs for more details.
The formats below describe the data structures used to define items in the timeline.
Defines an annotation drawn on specified events and entities.
string | nulldefault: nullThe annotation body border color, or null for no border.
'rectangle' | 'roundrect'default: 'roundrect'The annotation body border shape.
'solid' | 'dashed'default: 'solid'The annotation body border line style.
numberdefault: 1The width of the border for the annotation body.
objectThe style of the connector between the annotation and the annotated subject(s).
stringdefault: '#fff'The color of the connector line and container.
'none' | 'rectangle' | 'roundrect'default: 'roundrect'The shape of the container to draw around the subject(s).
'solid' | 'dashed'default: 'solid'The style of the connector line and container.
booleandefault: falseWhether to merge multiple containers together.
'arrow' | 'dot' | 'circle' | 'none'default: 'circle'The decoration shown at the subject end of the connector line.
numberdefault: 1The width of the connector line and container.
string | nulldefault: '#33353e'The annotation body fill color, or null for no fill.
numberdefault: 16The font size of the annotation body label.
label
requiredstringThe text for the annotation body.
stringdefault: '#fff'The color of the text annotation body label.
objectThe position of the annotation relative to the subject(s) it annotates.
string | numberdefault: 'top'The angle at which the annotation is positioned relative to its subject(s). Use a compass point value ( 'n', 'ne' etc.) or integer degrees clockwise from the top. Use 'top' or 'bottom' to position the annotation in the top or bottom rail.
numberdefault: 10Distance between the annotation and its subject(s) in pixels.
subject
requiredstring | EntityRangeSubject | (string | EntityRangeSubject)[]The subject or subjects to annotate: string ids for events or EntityRangeSubject objects for ranges of entity activity.
An object describing the annotation body position in view coordinates, which are measured in pixels relative to the top left corner of the timeline.
Options to set the drag.
type
required'annotationScrollBar' | 'labelAreaWidth' | 'lensScrollbar' | 'marqueeRange' | 'marqueeSelection' | 'moveAnnotation' | 'pan' | nullThe type of drag:
- 'annotationScrollBar' - Scrolls the text of an annotation.
- 'labelAreaWidth' - Changes the width of the entity label area.
- 'lensScrollbar' - Scrolls through lens view.
- 'marqueeRange' - Draws a marquee range. On
drag-end, the default action is to zoom into the selected range. - 'marqueeSelection' - Draws a selection marquee.
- 'moveAnnotation' - Moves the body of an annotation.
- 'pan' - Pans the timeline.
- null - No dragging behavior.
Defines an entity, an item drawn horizontally along the timeline.
stringThe color of the entity.
anyProperty for storing custom data for the entity.
booleanControls whether the entity line outside the range of its associated events should be faded.
stringThe text for the entity's label. If not specified, the entity's id is used. See also truncateLabelsAt.
stringThe color of the entity labels.
numberThe width (thickness) of the entity's timeline in pixels. When using expanded rows, only applies to rows, not sub-rows.
stringdefault: 'default'The type of the entity as declared in the entityTypes object. If not specified, the 'default' type is used. See the Entity Types docs.
An object describing the entity position in view coordinates, which are measured in pixels relative to the top left corner of the timeline.
x1
requirednumberThe x position at the left edge of the row containing the entity.
x2
requirednumberThe x value at the right edge of the row containing the entity.
y1
requirednumberThe y value at the top of the row containing the entity.
y2
requirednumberThe y value at the bottom of the row containing the entity.
An object identifying a time range to annotate for a specified entity or entities.
Specifies the properties of an entity that can be overridden with overrideStyles.
stringThe color of the entity.
booleanControls whether the entity line outside the range of its associated events should be faded.
stringThe color of the entity labels.
numberThe width (thickness) of the entity's timeline in pixels. When using expanded rows, only applies to rows, not sub-rows.
Specifies the appearance and behavior of types of entities.
stringdefault: 'default'The name of the entity type that this type inherits any unspecified properties from.
stringdefault: '#3ebd93'The color of entities of this type.
booleandefault: falseControls if entity lines outside their range of associated events are faded.
The glyph drawn for the label of entities of this type. If false or not specified, no glyph is drawn.
string[]An array specifying the names of properties on the entity's data object used for grouping entities of this type, innermost first. For example: ['city', 'state', 'country'] will group by city, then state, then country.
stringdefault: '#e5e8eb'The label color for entities of this type.
numberdefault: 1The line width in pixels for entities of this type.
numberA number specifying the display order for entities of this type. Entity types with lower values are placed higher. Entities with no specified order appear at the bottom.
The glyph drawn in the label for a group of entities of this type. If false or not specified, no glyph is drawn.
string | falseThe text used to label a group of entities of this type. If false, no label is shown. If not specified, the type name is used.
Defines an event, an item drawn on or between entities at a particular time.
string | 'from' | 'to' | 'entity' | 'inverse'The color of the event. Can be either a single color or one of the following values. Also applies to events with more than 2 entities.
- 'from' - Event takes its color from its first 'from' entity.
- 'to' - Event takes its color from its first 'to' entity.
- 'entity' - Event has a color gradient matching the color of each entity it joins with.
- 'inverse' - Event has a color gradient with each end matching the opposite entity's color. For events with more than 2 entities, the color gradient follows the 'from' coloring behavior.
anyProperty for storing custom data for the event.
entityIds
requiredstring[] | { from: string | string[]; to?: string | string[] }The ids of entities connected to the event. An event must have at least one connected entity. entityIds may be provided as:
- An array of entity ids, where the event is directed from the first entity to the rest of the entities.
- An object with
fromandtoproperties which determine the event direction in relation to each entity. These properties can be either a single string entity id, or an array of entity ids.
number | stringThe width of the event line.
- If a number, is used directly as the line width in px units.
- If a string, the value of the corresponding property on the event's
dataobject is used instead, and an adjustment is applied to these values to even the distribution of the line widths throughout the dataset. - If not specified, the value in the event's type is used.
booleanControls if arrows on the event are shown. If not specified, the value in the event's type is used.
Either a Date in local time, a millisecond number in UTC, or a TimeRange object.
numberThe number of nanoseconds to add to the time value.
stringThe type of the event as declared in the eventTypes object.
A dictionary detailing which modifier keys were pressed when the event occurred.
booleanIf an alt key was held down when the event occurred.
booleanIf a consistent control key was held down when the event occurred. cmd key on MacOS, ctrl key on other OSs.
booleanIf a control key was held down when the event occurred.
booleanIf the meta key was held down when the event occurred.
booleanIf a shift key was held down when the event occurred.
An object describing the event position in view coordinates, which are measured in pixels relative to the top left corner of the timeline.
x1
requirednumberThe x position corresponding to the start time of the event.
x2
requirednumberThe x position corresponding to the end time of the event.
y1
requirednumberThe y value of the top of the event.
y2
requirednumberThe y value of the bottom of the event.
wrappedSegments
required{ x1: number; x2: number }[]This property only applies when using Scale Wrapping. An array containing the x positions corresponding to the start and end times for each segment, ordered from left to right as they appear on the timeline. For most events, there is only one segment, so can be ignored.
Specifies the properties of an event that can be overridden with overrideStyles.
string | 'from' | 'to' | 'entity' | 'inverse'The color of the event. Can be either a single color or one of the following values. Also applies to events with more than 2 entities.
- 'from' - Event takes its color from its first 'from' entity.
- 'to' - Event takes its color from its first 'to' entity.
- 'entity' - Event has a color gradient matching the color of each entity it joins with.
- 'inverse' - Event has a color gradient with each end matching the opposite entity's color. For events with more than 2 entities, the color gradient follows the 'from' coloring behavior.
numberThe width of the event line in pixels.
booleanControls if arrows on the event are shown. If not specified, the value in the event's type is used.
stringThe type of the event as declared in the eventTypes object.
Defines the appearance of types of events.
stringdefault: 'default'The name of the event type that this type inherits any unspecified properties from.
string | 'from' | 'to' | 'entity' | 'inverse'default: 'entity'The color of events of this type, either a single color or one of these values. Also applies to events with more than 2 entities.
- 'from' - Event takes its color from its first 'from' entity.
- 'to' - Event takes its color from its first 'to' entity.
- 'entity' - Event has a color gradient matching the color of each entity it joins with.
- 'inverse' - Event has a color gradient with each end matching the opposite entity's color. For events with more than 2 entities, the color gradient follows the 'from' coloring behavior.
number | stringdefault: 1.5The width of the event line for events of this type.
- If a number, is used directly as the line width in px units.
- If a string, the value of the corresponding property on the event's
dataobject is used instead, and an adjustment is applied to these values to even the distribution of the line widths throughout the dataset.
booleandefault: trueControls if arrows should be shown on events of this type.
An object specifying the entities whose rows are expanded (according to the expandedRows options), space permitting, and the expansion mode being used.
An object containing an image data URL.
url
requiredstringThe URL containing the blob url for the exported image.
Defines the attributes of a font icon.
stringThe color of the font icon. Default is the timeline's background color.
numberdefault: 0The horizontal offset as a percentage of the font icon's size.
numberdefault: 0The vertical offset as a percentage of the font icon's size.
stringThe name of the icon font family.
number | stringdefault: 'normal'The weight of the font.
numberdefault: 1The scale factor of the font icon.
stringThe text of the font icon. Can be an escaped character code or the icon character itself.
Defines the attributes of a glyph.
Defines a color to be used for heatmap cells with a value greater than or equal to the step value.
Defines a color to be used for a heatmap cell that includes an event of the specified type.
Defines the attributes of a label.
string | 'event'default: 'event'The color of the label background.
stringdefault: '#242c32'The color of the label text.
string | 'event'default: 'event'The color of the label hint.
'up' | 'down' | 'horizontal'default: 'horizontal'The orientation of the label.
'roundrect' | 'rectangle'default: 'roundrect'The shape of the label.
string | LabelFontIconThe text to display in the label.
Defines the attributes of a font icon for an Event Label.
stringThe name of the icon font family.
number | stringdefault: 900The weight of the font.
text
requiredstringThe text of the font icon. Can be an escaped character code or the icon character itself.
An object containing the mode of calculation for the width of the label area and the width. See Entity Label Area Width.
Defines a marker drawn across the timeline at a specified time.
stringThe color of the marker circle and line.
label
requiredstringThe text for the label of the marker.
stringThe color of the marker label.
booleanWhether to show the marker label and circle at the bottom of the timeline.
booleanWhether to show the marker label and circle at the top of the timeline.
booleanWhether to show the vertical marker line. A marker can only be displayed if either showAtTop or showAtBottom is set to 'true'. If both are set to 'false', showLine has no effect and the line is not drawn.
The time that the marker is located at, either a Date in local time, a millisecond number in UTC, or a TimeRange object.
numberThe number of nanoseconds to add to the time value.
An object describing the targeted sub-item.
numberThe index of the sub-item.
subId
requiredstringEncoded information unique to the sub-item.
DateThe time property of the sub-item.
numberThe number of nanoseconds to add to the time value.
numberThe value property of the sub-item.
x
requirednumberThe distance from the left edge of the Timeline element to the center of the sub-item.
y
requirednumberThe distance from the top edge of the Timeline element to the center of the sub-item.
numberThe width of the sub-item in pixels.
numberThe height of the sub-item in pixels.
A range of time.
end
requiredDate | numberThe end of the time range as a Date in local time, or a millisecond number in UTC.
numberThe number of nanoseconds to add to the end time value.
start
requiredDate | numberThe start of the time range as a Date in local time, or a millisecond number in UTC.
numberThe number of nanoseconds to add to the start time value.
Defines a time series chart.
stringThe color of the line connecting data points in the time series chart. An alpha value is applied to the area under the chart.
data
requiredThe time series data.
numberdefault: 0.3The alpha value applied to the area under the time series chart line. Set to 0 to remove the shaded area.
stringThe label for the time series chart. The label is not shown if the chart is in a stack.
stringThe label color.
'solid' | 'dashed'default: 'solid'The style of line connecting data points in the time series chart.
'linear' | 'step'default: 'linear'The type of line connecting data points in the time series chart.
A data point in a time series chart.
Defines a time series chart stack.
chartIds
requiredstring[]The ids of the time series charts included in the stack.
stringThe label for the stack.
stringThe stack label's color.
annotations
required{ [id: string]: Annotation }entities
required{ [id: string]: Entity }entitySelection
requiredstring[]entitySelectionEnabled
requiredbooleanentityTypes
requiredEntityTypes | undefinedevents
required{ [id: string]: Event }eventSelection
requiredstring[]eventSelectionMode
requiredbooleaneventTypes
requiredEventTypes | undefinedexpandedRows
requiredfocus
requiredstring[]highlight
requiredstring[]labelAreaWidth
requiredlens
requiredstring | nulloptions
requiredordering
requiredOrderingNameoverrideStyles
required({ ids: string | string[]; style: EntityStyle | EventStyle })[]pin
requiredstring[]reveal
requiredstring[]timeSeriesCharts
required{ [id: string]: TimeSeriesChart } | undefinedtimeSeriesChartStacks
required{ [id: string]: TimeSeriesChartStack } | undefined