/vue-plotly

Vue Plotly is a lightweight wrapper of Plotly.js for Vue 3.

Primary LanguageVue

Vue Plotly

A thin wrapper of Plotly.js for Vue 3. This package provides a Vue component that makes it easy to use Plotly.js in your Vue 3 applications.

Installation

npm install @tusharjoy/vue-plotly

Usage

In your Vue component:

<template>
	<VuePlotly :data="data" :layout="layout" :config="config" />
</template>

<script>
import VuePlotly from '@tusharjoy/vue-plotly';

export default {
	components: {
		VuePlotly
	},
	data() {
		return {
			data: [...],  // your data here
			layout: {...},  // your layout here
			config: {...},  // your config here
		};
	},
};
</script>

Props

data: (Array) The data for the plot. Required.
layout: (Object) The layout of the plot. Required.
config: (Object) The configuration options for the plot. Optional.

License

MIT

Please replace the placeholders in the usage example with actual data, layout, and config examples.