vue-timeline-chart
vue-timeline-chart
A simple yet versatile Vue 3 component that allows you to plot points or ranges on a timeline.
Zoom in/out, scroll horizontally and update content dynamically.
Live Demo · Documentation · Report Issue · Discussions
Features
- Zooming — zoom in and out with scroll or pinch gestures
- Infinite scrolling — native horizontal scroll events (shift+scroll to convert vertical to horizontal)
- Flexible data — plot ranges, points, markers and backgrounds
- Stacking — overlapping items can be dynamically stacked
- Touch support — smooth pinch-to-zoom and up to 2-finger panning (with momentum)
- Adjustable labels — timestamp labels adapt per scale
- Minimal styling — staying out of your way
- Customizable — use events, slots, methods and CSS variables to adapt to your needs
Getting started
Installation
pnpm add vue-timeline-chart
Setup
import { Timeline } from 'vue-timeline-chart'
import 'vue-timeline-chart/style.css'
Example
<Timeline
:groups="groups"
:items="items"
:markers="markers"
:viewportMin="1691089380000"
:viewportMax="1691101020000"
:minViewportDuration="1000 * 60"
:maxViewportDuration="1000 * 60 * 60 * 24 * 7"
@mousemoveTimeline="onMousemoveTimeline"
@mouseleaveTimeline="onMouseleaveTimeline"
>
<template #group-label="{ group }">
{{ group.label }}
</template>
<template #item="{ item }">
<div
:title="item.title || null"
style="inset: 0; position: absolute;"
></div>
</template>
</Timeline>
Development
# Install dependencies
pnpm install
# Dev server with live reloading
pnpm start
# Build and watch for changes
pnpm dev
Recommended IDE Setup
Related Packages
Version History
| Version | Released | License |
|---|---|---|
| 5.2.0 | MIT | |
| 5.1.0 | MIT | |
| 5.0.2 | MIT | |
| 5.0.1 | MIT | |
| 5.0.0 | MIT | |
| 4.1.3 | MIT | |
| 4.1.2 | MIT | |
| 4.1.1 | MIT | |
| 4.0.1 | MIT | |
| 4.0.0 | MIT | |
| 3.1.0 | MIT | |
| 3.0.1 | MIT | |
| 3.0.0 | MIT | |
| 2.12.0 | MIT | |
| 2.11.0 | MIT | |
| 2.10.0 | MIT | |
| 2.9.0 | MIT | |
| 2.8.1 | MIT | |
| 2.7.0 | MIT | |
| 2.6.1 | MIT | |
| 2.6.0 | MIT | |
| 2.5.0 | MIT | |
| 2.4.2 | MIT | |
| 2.4.1 | MIT | |
| 2.4.0 | MIT | |
| 2.3.1 | MIT | |
| 2.3.0 | MIT | |
| 2.2.0 | MIT | |
| 2.1.2 | MIT | |
| 2.1.1 | MIT |
Showing the latest 30 of 55. See every release on npm
Pre-releases (2)
| Version | Released | License |
|---|---|---|
| 5.1.0-beta.0 | MIT | |
| 5.0.0-beta.0 | MIT |