This plugin allows you to create videos from chart animations in Vizzu.
$ npm install @vizzu/video-capture
To use the plugin, simply add it to your Vizzu instance as a feature:
import { VideoCapture } from '@vizzu/video-capture'
await chart.initializing
chart.feature(new VideoCapture(), true)
Once registered, you can start and stop the recording as needed:
const anim = chart.animate({
data,
config: {
x: 'Year',
y: ['Value 2 (+)', 'Joy factors'],
color: 'Joy factors',
title: 'Video Export'
}
})
anim.activated.then(() => {
chart.feature.videoCapture.start()
})
anim.then(async (chart) => {
const output = await chart.feature.videoCapture.stop()
window.open(output.getObjectURL())
})
The plugin provides two functions, start()
to begin the recording and stop()
to end it.
chart.feature.videoCapture.start()
chart.feature.videoCapture.stop()
If you need to change the Vizzu
version number in the plugins, use the following command:
yarn node tools/updateVizzuMinorVersion.cjs <version>
Copyright © 2021-2023 Vizzu Inc.
Released under the Apache 2.0 License.