Socket
Socket
Sign inDemoInstall

@types/vis

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/vis - npm Package Compare versions

Comparing version 4.17.3 to 4.17.4

194

vis/index.d.ts
// Type definitions for vis.js 4.17
// Project: https://github.com/almende/vis
// Definitions by: Michaël Bitard <https://github.com/MichaelBitard>
// MacLeod Broad <https://github.com/macleodbroad-wf>
// Adrian Caballero <https://github.com/adripanico>

@@ -32,3 +33,24 @@ // Severin <https://github.com/seveves>

'timechanged';
type Graph2dStyleType = 'line' | 'bar' | 'points';
type Graph2dBarChartAlign = 'left' | 'center' | 'right';
type Graph2dDrawPointsStyle = 'square' | 'circle';
type LegendPositionType = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
type ParametrizationInterpolationType = 'centripetal' | 'chordal' | 'uniform' | 'disabled';
type TopBottomEnumType = 'top' | 'bottom';
type RightLeftEnumType = 'right' | 'left';
interface LegendPositionOptions {
visible?: boolean;
position?: LegendPositionType;
}
interface LegendOptions {
enabled?: boolean;
icons?: boolean;
iconSize?: number;
iconSpacing?: number;
left?: LegendPositionOptions;
right?: LegendPositionOptions;
}
interface DataItem {

@@ -48,2 +70,8 @@ className?: string;

interface PointItem extends DataItem {
x: string;
y: number;
}
interface DataGroup {

@@ -53,2 +81,3 @@ className?: string;

id: IdType;
options?: DataGroupOptions;
style?: string;

@@ -59,2 +88,15 @@ subgroupOrder?: string | (() => void);

interface DataGroupOptions {
drawPoints?: Graph2dDrawPointsOption | (() => void); // TODO
excludeFromLegend?: boolean;
interpolation?: boolean | InterpolationOptions;
shaded?: Graph2dShadedOption;
style?: string;
yAxisOrientation?: RightLeftEnumType;
}
interface InterpolationOptions {
parametrization: ParametrizationInterpolationType;
}
interface TimelineEditableOption {

@@ -146,2 +188,3 @@ add?: boolean;

orientation?: TimelineOptionsOrientationType;
rollingMode: boolean;
selectable?: boolean;

@@ -534,2 +577,153 @@ showCurrentTime?: boolean;

interface TitleOption {
text?: string;
style?: string;
}
interface RangeType {
min: IdType;
max: IdType;
}
interface DataAxisSideOption {
range?: RangeType;
format?: () => string;
title?: TitleOption;
}
interface Graph2dBarChartOption {
width?: number;
minWidth?: number;
sideBySide?: boolean;
align?: Graph2dBarChartAlign;
}
interface Graph2dDataAxisOption {
orientation?: TimelineOptionsOrientationType;
showMinorLabels?: boolean;
showMajorLabels?: boolean;
majorLinesOffset?: number;
minorLinesOffset?: number;
labelOffsetX?: number;
labelOffsetY?: number;
iconWidth?: number;
width?: string;
icons?: boolean;
visible?: boolean;
alignZeros?: boolean;
left?: DataAxisSideOption;
right?: DataAxisSideOption;
}
interface Graph2dDrawPointsOption {
enabled?: boolean;
onRender?: () => boolean; // TODO
size?: number;
style: Graph2dDrawPointsStyle;
}
interface Graph2dShadedOption {
orientation?: TopBottomEnumType;
groupid?: IdType;
}
type Graph2dOptionBarChart = number | Graph2dBarChartOption;
type Graph2dOptionDataAxis = boolean | Graph2dDataAxisOption;
type Graph2dOptionDrawPoints = boolean | Graph2dDrawPointsOption;
type Graph2dLegendOption = boolean | LegendOptions;
interface Graph2dOptions {
autoResize?: boolean;
barChart?: Graph2dOptionBarChart;
clickToUse?: boolean;
configure?: TimelineOptionsConfigureType;
dataAxis?: Graph2dOptionDataAxis;
defaultGroup?: string;
drawPoints?: Graph2dOptionDrawPoints;
end?: DateType;
format?: any; // TODO
graphHeight?: HeightWidthType;
height?: HeightWidthType;
hiddenDates?: any; // TODO
legend?: Graph2dLegendOption;
locale?: string;
locales?: any; // TODO
moment?: () => void; // TODO
max?: DateType;
maxHeight?: HeightWidthType;
maxMinorChars?: number;
min?: DateType;
minHeight?: HeightWidthType;
moveable?: boolean;
multiselect?: boolean;
orientation?: string;
sampling?: boolean;
showCurrentTime?: boolean;
showMajorLabels?: boolean;
showMinorLabels?: boolean;
sort?: boolean;
stack?: boolean;
start?: DateType;
style?: Graph2dStyleType;
throttleRedraw?: number;
timeAxis?: TimelineTimeAxisOption;
width?: HeightWidthType;
yAxisOrientation?: RightLeftEnumType;
zoomable?: boolean;
zoomKey?: string;
zoomMax?: number;
zoomMin?: number;
zIndex?: number;
}
export class Graph2d {
constructor(
container: HTMLElement,
items: DataItemCollectionType,
groups: DataGroupCollectionType,
options?: Graph2dOptions
);
constructor(
container: HTMLElement,
items: DataItemCollectionType,
options?: Graph2dOptions
);
addCustomTime(time: DateType, id?: IdType): IdType;
destroy(): void;
fit(options?: TimelineFitOptions): void;
focus(ids: IdType | IdType[], options?: TimelineFitOptions): void;
getCurrentTime(): Date;
getCustomTime(id?: IdType): Date;
getEventProperties(event: Event): TimelineEventPropertiesResult;
getItemRange(): any; // TODO
getSelection(): IdType[];
getVisibleItems(): IdType[];
getWindow(): { start: Date, end: Date };
moveTo(time: DateType, options?: TimelineFitOptions): void;
on(event: TimelineEvents, callback: () => void): void;
off(event: TimelineEvents, callback: () => void): void;
redraw(): void;
removeCustomTime(id: IdType): void;
setCurrentTime(time: DateType): void;
setCustomTime(time: DateType, id?: IdType): void;
setCustomTimeTitle(title: string, id?: IdType): void;
setData(data: { groups?: DataGroupCollectionType; items?: DataItemCollectionType }): void;
setGroups(groups?: DataGroupCollectionType): void;
setItems(items: DataItemCollectionType): void;
setOptions(options: TimelineOptions): void;
setSelection(ids: IdType | IdType[]): void;
setWindow(start: DateType, end: DateType, options?: TimelineFitOptions): void;
}
export interface Graph2d {
setGroups(groups?: TimelineGroup[]): void;
setItems(items?: TimelineItem[]): void;
getLegend(): TimelineWindow;
getWindow(): TimelineWindow;
setWindow(start: any, date: any): void;
focus(selection: any): void;
on(event?: string, callback?: (properties: any) => void): void;
}
export class Timeline {

@@ -536,0 +730,0 @@ constructor(

8

vis/package.json
{
"name": "@types/vis",
"version": "4.17.3",
"version": "4.17.4",
"description": "TypeScript definitions for vis.js",

@@ -12,2 +12,6 @@ "license": "MIT",

{
"name": "MacLeod Broad",
"url": "https://github.com/macleodbroad-wf"
},
{
"name": "Adrian Caballero",

@@ -37,4 +41,4 @@ "url": "https://github.com/adripanico"

"peerDependencies": {},
"typesPublisherContentHash": "a68819a6a785f708e33f72db7d77d684a3af0d68d01a3e7cc0d8b39157f3f86e",
"typesPublisherContentHash": "ac67191017b58ea7ddfe8236576602bd962928974b596bce3a48daeebc5d2e1b",
"typeScriptVersion": "2.0"
}

@@ -11,3 +11,3 @@ # Installation

Additional Details
* Last updated: Thu, 23 Feb 2017 18:39:28 GMT
* Last updated: Sat, 11 Mar 2017 00:22:02 GMT
* Dependencies: none

@@ -17,2 +17,2 @@ * Global values: vis

# Credits
These definitions were written by Michaël Bitard <https://github.com/MichaelBitard>, Adrian Caballero <https://github.com/adripanico>, Severin <https://github.com/seveves>, kaktus40 <https://github.com/kaktus40>, Matthieu Maitre <https://github.com/mmaitre314>.
These definitions were written by Michaël Bitard <https://github.com/MichaelBitard>, MacLeod Broad <https://github.com/macleodbroad-wf>, Adrian Caballero <https://github.com/adripanico>, Severin <https://github.com/seveves>, kaktus40 <https://github.com/kaktus40>, Matthieu Maitre <https://github.com/mmaitre314>.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc