Gathering detailed insights and metrics for react-vis-timeline-3
Gathering detailed insights and metrics for react-vis-timeline-3
Gathering detailed insights and metrics for react-vis-timeline-3
Gathering detailed insights and metrics for react-vis-timeline-3
npm install react-vis-timeline-3
Typescript
Module System
Node Version
NPM Version
55.5
Supply Chain
90.3
Quality
74.8
Maintenance
100
Vulnerability
97.9
License
TypeScript (99.33%)
JavaScript (0.67%)
Total Downloads
11,657
Last Day
11
Last Week
132
Last Month
1,105
Last Year
9,465
65 Stars
67 Commits
48 Forks
5 Watching
55 Branches
12 Contributors
Latest Version
2.1.0
Package Id
react-vis-timeline-3@2.1.0
Unpacked Size
39.67 kB
Size
12.26 kB
File Count
22
NPM Version
8.6.0
Node Version
18.0.0
Cumulative downloads
Total Downloads
Last day
-26.7%
11
Compared to previous day
Last week
-29%
132
Compared to previous week
Last month
-36.9%
1,105
Compared to previous month
Last year
362.4%
9,465
Compared to previous year
8
28
React component for the vis-timeline
timeline module.
npm install --save react-vis-timeline
OR
yarn add react-vis-timeline
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} />
react-visjs-timeline
?Written in Typescript
Using vis-timeline
library! without the old vis.js
No unnecessary re-renders
The old lib caused re-renders on each prop changed, and using immutable objects to detect changes. This was very problematic and caused performance issues. We don't want to re-render the whole timeline, just because 1 item added to the items array.
API changes (items, groups)
vis-timeline already knows how to detect changes with vis-data
's DataSet object.
So in this library, we take it as an advantage and using these DataSets.
While exposing them to the user within ref
.
You can also insert initial data with props, and update/add/remove later with ref API.
Expose the timeline's API.
Methods like focus
, fit
, and many more native vis-timeline methods exposed as well in optional ref
.
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 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/>
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.
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}
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}
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
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
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
99 existing vulnerabilities detected
Details
Score
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 More