Installations
npm install react-vis-timeline
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
12.16.1
NPM Version
6.13.4
Score
55.3
Supply Chain
91.2
Quality
74.7
Maintenance
100
Vulnerability
97.6
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (99.33%)
JavaScript (0.67%)
Developer
razbensimon
Download Statistics
Total Downloads
196,228
Last Day
92
Last Week
695
Last Month
2,971
Last Year
41,995
GitHub Statistics
65 Stars
67 Commits
48 Forks
5 Watching
55 Branches
12 Contributors
Package Meta Information
Latest Version
2.0.3
Package Id
react-vis-timeline@2.0.3
Unpacked Size
38.18 kB
Size
11.93 kB
File Count
24
NPM Version
6.13.4
Node Version
12.16.1
Total Downloads
Cumulative downloads
Total Downloads
196,228
Last day
-9.8%
92
Compared to previous day
Last week
2.4%
695
Compared to previous week
Last month
34.9%
2,971
Compared to previous month
Last year
27.2%
41,995
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
8
Dev Dependencies
28
React vis-timeline component
React component for the vis-timeline
timeline module.
Installation
npm install --save react-vis-timeline
OR
yarn add react-vis-timeline
Getting Started
1import Timeline from 'react-vis-timeline' 2 3// https://visjs.github.io/vis-timeline/docs/timeline/#Configuration_Options 4 5const options = { 6 width: '100%', 7 height: '100px', 8 // ... 9 // ... 10} 11 12// JSX 13<Timeline options={options} />
What are the differences from react-visjs-timeline
?
-
Written in Typescript
-
Using
vis-timeline
library! without the oldvis.js
-
No unnecessary re-renders
the old lib re-rendered on each prop changed, while using immutable objects to detect changes. This was very problematic and caused performance issues. We don't wont to re-render the whole timeline, just because 1 item added to the items array.
-
API changes (items, groups)
vis-timeline already know how to detect changes with
vis-data
's DataSet object. So in this library we take it as an advantage and using this DataSets. While exposing them to the user withinref
.Yoa can also insert initial data with props, and update/add/remove later with ref API.
-
Expose timeline's API.
Methods like
focuse
,fit
and many more native vis-timeline methods exposed as well in optionalref
.
Supported Features
- Configuration Options
- Items
- Groups
- Custom Times
- Events
- Selection
- Timeline's API
Items
Items follow the exact same for format as they do in `vis-timeline``. See the vis-timeline documentation for more information.
1const items = [{ 2 start: new Date(2010, 7, 15), 3 end: new Date(2010, 8, 2), // end is optional 4 content: 'Trajectory A', 5}] 6 7<Timeline 8 options={options} 9 initialItems={items} 10/>
Groups
Groups follow the exact same for format as they do in vis-timeline. See the vis-timeline documentation for more information.
1const groups = [{ 2 id: 1, 3 content: 'Group A', 4}] 5 6<Timeline 7 options={options} 8 initialGroups={groups} 9/>
Custom Times
CustomTimes defined more declaratively in the component, via the customTimes
prop.
1const customTimes = [ 2 { 3 id: 'one', 4 datetime: new Date() 5 }, 6 { 7 id: 'two', 8 datetime: 'Tue May 10 2016 16:17:44 GMT+1000 (AEST)' 9 } 10]
When the customTimes
prop changes, the updated times will be reflected in the timeline.
Events
All events are supported via prop function handlers. The prop name follows the convention <eventName>Handler
and the specified function will receive the same arguments as the vis-timeline counterparts.
Some vis-timeline event names are not camelcased (e.g. rangechange
), so the corresponding React prop names need to follow that convention where necessary:
1<Timeline 2 options={options} 3 clickHandler={clickHandler} 4 rangechangeHandler={rangeChangeHandler} 5/> 6 7function clickHandler(props) { 8 // handle click event 9} 10 11function rangeChangeHandler(props) { 12 // handle range change 13}
Animation
You can enable animation (when the options start/end values change) by passing a prop of animation
to the component. The available options for this prop follow the same conventions as setWindow
in vis-timeline
. So you can either pass a boolean value (true
by default) or an object specifying your animation configuration, e.g:
1// animate prop... 2{ 3 duration: 3000, 4 easingFunction: 'easeInQuint' 5}
Styling
Import your custom CSS after you import the component from the module, e.g:
1import Timeline from 'react-vis-timeline'; 2import './my-custom-css.css';
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE.md:0
- Info: FSF or OSI recognized license: MIT License: LICENSE.md:0
Reason
Found 2/23 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 9 are checked with a SAST tool
Reason
99 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-whgm-jr23-g3j9
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw
- Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5
- Warn: Project is vulnerable to: GHSA-257v-vj4p-3w2h
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-p28h-cc7q-c4fg
- Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-3wcq-x3mq-6r9p
- Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w
- Warn: Project is vulnerable to: GHSA-434g-2637-qmqr
- Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m
- Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw
- Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p
- Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747
- Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h
- Warn: Project is vulnerable to: GHSA-6h5x-7c5m-7cr7
- Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc
- Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx
- Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q
- Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c
- Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-7r28-3m3f-r2pr
- Warn: Project is vulnerable to: GHSA-r8j5-h5cx-65gg
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq
- Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488
- Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-r6rj-9ch6-g264
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m / GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4
- Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g
- Warn: Project is vulnerable to: GHSA-w9mr-4mfr-499f
- Warn: Project is vulnerable to: GHSA-92xj-mqp7-vmcj
- Warn: Project is vulnerable to: GHSA-wxgw-qj99-44c2
- Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5
- Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp
- Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq
- Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr
- Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765
- Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g
- Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p
- Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr
- Warn: Project is vulnerable to: GHSA-cwx2-736x-mf6w
- Warn: Project is vulnerable to: GHSA-v39p-96qg-c8rf
- Warn: Project is vulnerable to: GHSA-8v63-cqqc-6r2c
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w
- Warn: Project is vulnerable to: GHSA-566m-qj78-rww5
- Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-5q6m-3h65-w53x
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-hxcc-f52p-wc94
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7
- Warn: Project is vulnerable to: GHSA-c9g6-9335-x697
- Warn: Project is vulnerable to: GHSA-vx3p-948g-6vhq
- Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc
- Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-9m6j-fcg5-2442
- Warn: Project is vulnerable to: GHSA-hh27-ffr2-f2jc
- Warn: Project is vulnerable to: GHSA-rqff-837h-mm52
- Warn: Project is vulnerable to: GHSA-8v38-pw62-9cw2
- Warn: Project is vulnerable to: GHSA-hgjh-723h-mx2j
- Warn: Project is vulnerable to: GHSA-jf5r-8hm2-f872
- Warn: Project is vulnerable to: GHSA-9mrv-456v-pf22
- Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
- Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp
- Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx
- Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch
Score
1.7
/10
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to react-vis-timeline
react-vis-timeline-2
React component for the vis-timeline module
react-milestones-vis
React component for d3-milestones, a d3 based timeline visualization.
react-vis-timeline-3
React component for the vis-timeline module
react-lms-vis-timeline
React component for the vis-timeline module