@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
137 lines (135 loc) • 7.97 kB
TypeScript
import type { ClonableMixin } from "../core/Clonable.js";
import type { JSONSupport } from "../core/JSONSupport.js";
import type { EventsTicksVisualization } from "./types.js";
import type { TimeDirection as TimeDirectionJSON } from "../portal/jsonTypes.js";
export interface ChronologicalLayoutSettingsProperties extends Partial<Pick<ChronologicalLayoutSettings, "durationLineWidth" | "entityPositionAtDurationRatio" | "eventsTicksVisualization" | "lineSeparationMultiplier" | "moveFirstBends" | "secondBendRatio" | "separatedLineShapeRatio" | "separateTimelineOverlaps" | "separateTimeOverlaps" | "showDurationLineForNonZeroDurationEntityEvents" | "showNonZeroDurationIntervalBounds" | "spaceSeparatedLinesEvenly" | "timeBannerUTCOffsetInMinutes" | "timeDirection" | "useBezierCurves">> {}
/**
* Chronological layouts arrange entities and relationships using time. Entities with time properties, called event entities, and relationships with time properties, called event relationships, will be arranged on one or multiple timelines in the order that they occurred. The entity type or relationship type must have a time property and the layer must be time enabled for an entity or relationship to be considered an event. By default the time direction starts with the oldest date on the left and the newest date on the right. These layouts include a time banner which shows the time intervals most appropriate for the data, the start and end of each event, and the UTC offset. Settings allow you to customize the direction of the time axis, time zone, and the placement of entities and relationships.
* There are four types of events represented in chronological layouts:
* - Durative entity events: Entities with a start and end date property.
* - Punctual entity events: Entities with only one date property.
* - Durative relationship events: Relationships with a start and end date property.
* - Punctual relationship events: Relationships with only one date property.
*
* Settings allow you to adjust the time banner, time direction, and how entities and relationships are positioned on a link chart.
*
* > [!WARNING]
* >
* > **Implementation Note**
* >
* >
* > Chronological layouts require "Filter content using time" to be configured on the [link chart sublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/knowledgeGraph/KnowledgeGraphSublayer/#timeInfo) properties.
* > The time fields used must have the type `timestamp offset`. Time can be set on a link chart created in ArcGIS Pro
* > and imported into to [ArcGIS Knowledge Studio](https://enterprise.arcgis.com/en/knowledge/latest/knowledge-studio/import-link-charts.htm), or you can set time in the link chart layer definition using ArcGIS Pro or the ArcGIS REST API.
*
* @since 4.32
*/
export default class ChronologicalLayoutSettings extends ChronologicalLayoutSettingsSuperclass {
constructor(properties?: ChronologicalLayoutSettingsProperties);
/**
* An integer between 1 and 10 setting the width of the line, in points, representing the duration of events with non-zero durations.
* Applied only when [showDurationLineForNonZeroDurationEntityEvents](https://developers.arcgis.com/javascript/latest/references/core/linkChart/ChronologicalLayoutSettings/#showDurationLineForNonZeroDurationEntityEvents) is true.
*
* @default 5
*/
accessor durationLineWidth: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
/**
* Determines the placement of an entity along a non-zero duration event interval.
* 0 represents the start of the interval, 1 represents the end of the interval.
* Only used in multi-timeline layouts.
*
* @default 1
*/
accessor entityPositionAtDurationRatio: number;
/**
* Controls the display of start and end event ticks on the timeline. Default value is `start-and-end` where both
* start and end ticks are displayed.
*
* @default "start-and-end"
*/
eventsTicksVisualization: EventsTicksVisualization;
/**
* The multiplier to be used for relationship line separation, where a higher multiplier leads to greater separation between lines.
* Utilized if [separateTimeOverlaps](https://developers.arcgis.com/javascript/latest/references/core/linkChart/ChronologicalLayoutSettings/#separateTimeOverlaps) or [separateTimelineOverlaps](https://developers.arcgis.com/javascript/latest/references/core/linkChart/ChronologicalLayoutSettings/#separateTimelineOverlaps) is true.
*
* @default 1
*/
accessor lineSeparationMultiplier: number;
/**
* When [separateTimelineOverlaps](https://developers.arcgis.com/javascript/latest/references/core/linkChart/ChronologicalLayoutSettings/#separateTimelineOverlaps) is true, indicates whether the first bend on a relationship line related
* to an event is raised up above the event location, to reduce overlapping.
* Only valid in mono-timeline layouts.
*
* @default true
*/
accessor moveFirstBends: boolean;
/**
* Ratio from 0 to 1 controlling the position at which the second bend of a relationship occurs, for event and non-event relationships between event and non-event entities.
* Lower values move the second bend position lower. Only used in the mono-timeline layout.
*
* @default 0.3
*/
accessor secondBendRatio: number;
/**
* When [separateTimeOverlaps](https://developers.arcgis.com/javascript/latest/references/core/linkChart/ChronologicalLayoutSettings/#separateTimeOverlaps) is true, adjusts the angle between the extremities of the original and separated lines. When the ratio is high, the angle is small.
*
* @default 0
*/
accessor separatedLineShapeRatio: number;
/**
* Indicates whether events that overlap on a timeline are separated.
*
* @default true
*/
accessor separateTimelineOverlaps: boolean;
/**
* Indicates whether events that overlap in time are separated.
*
* @default true
*/
accessor separateTimeOverlaps: boolean;
/**
* Determines whether or not lines representing the duration of events on entities with non-zero durations are shown.
* By default (false) lines are not displayed.
*
* @default false
*/
accessor showDurationLineForNonZeroDurationEntityEvents: boolean;
/**
* Determines whether to display interval bounds (tick lines at the start and end) of relationship lines for events with non-zero durations.
* Only used in multi-timeline layouts.
*
* @default false
*/
accessor showNonZeroDurationIntervalBounds: boolean;
/**
* Determines whether or not to space separated lines evenly, when either [separateTimeOverlaps](https://developers.arcgis.com/javascript/latest/references/core/linkChart/ChronologicalLayoutSettings/#separateTimeOverlaps) or
* [separateTimelineOverlaps](https://developers.arcgis.com/javascript/latest/references/core/linkChart/ChronologicalLayoutSettings/#separateTimelineOverlaps) is true.
* When true, the offset for the i-th overlapping line is proportional to 'i'.
* If false, the offset is proportional to the square root of i.
*
* @default false
*/
accessor spaceSeparatedLinesEvenly: boolean;
/**
* The UTC offset in minutes to use for the time banner.
*
* @default 0
*/
accessor timeBannerUTCOffsetInMinutes: number;
/**
* Controls the time axis orientation and the direction along which time increases in the layout, e.g.
* 'right' means that time axis is horizontal and time increases from left to right,
* 'bottom' means the time axis is vertical and time increases from top to bottom.
*
* @default "right"
*/
accessor timeDirection: TimeDirectionJSON;
/**
* Determines whether or not to use Bezier curves for separated lines. This setting will have no effect where Bezier curves are not supported.
*
* @default false
*/
accessor useBezierCurves: boolean;
}
declare const ChronologicalLayoutSettingsSuperclass: typeof JSONSupport & typeof ClonableMixin