vue-timeline-chart
v4.1.3
Published
Vue3 Timeline Chart component
Downloads
10,996
Maintainers
Readme
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
- Touch support — smooth pinch-to-zoom and up to 2-finger panning
- Adjustable labels — timestamp labels adapt per scale
- Minimal styling — easy to customize to your needs
Getting started
Installation
pnpm add vue-timeline-chartSetup
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