Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ export interface TimelineOptions {
locale?: string;
locales?: any; // TODO
longSelectPressTime?: number,
loadingScreenTemplate?: () => string,
moment?: MomentConstructor;
margin?: TimelineOptionsMarginType;
max?: DateType;
Expand Down Expand Up @@ -463,8 +464,11 @@ export interface Graph2dOptions {
end?: DateType;
format?: any; // TODO
graphHeight?: HeightWidthType;
/** Show/hide groups. To show/hide the ungrouped (default group) data, use the special `"__ungrouped__"` as `groupId`. */
groups?: { visibility: { [groupId: IdType]: boolean; } };
height?: HeightWidthType;
hiddenDates?: any; // TODO
interpolation?: boolean | ParametrizationInterpolationType;
legend?: Graph2dLegendOption;
locale?: string;
locales?: any; // TODO
Expand Down Expand Up @@ -540,7 +544,13 @@ export class Graph2d {
export interface Graph2d {
setGroups(groups?: TimelineGroup[]): void;
setItems(items?: TimelineItem[]): void;
getLegend(): TimelineWindow;
/**
* Retrieve legend icon (SVG, name and y-axis affiliation)
* @param groupId group id for which the legend icon and name should be returned
* @param iconWidth icon width
* @param iconHeight icon height
*/
Comment on lines +547 to +552
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jsdocs make not much sense in type definition files. Please remove or replace with a one-line comment

getLegend(groupId: IdType, iconWidth: number, iconHeight: number): { icon: SVGElement, label: string, orientation: 'left' | 'right' };
getWindow(): TimelineWindow;
setWindow(start: any, date: any): void;
focus(selection: any): void;
Expand Down