Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pie / Donut chart events #502

Open
meganallas opened this issue Oct 18, 2023 · 0 comments
Open

Pie / Donut chart events #502

meganallas opened this issue Oct 18, 2023 · 0 comments

Comments

@meganallas
Copy link

meganallas commented Oct 18, 2023

Events, specifically click and dataPointSelection that I've tested, are not firing for Pie and Donut charts.
Did I miss something?

<script lang="ts">
import { defineComponent, onMounted, ref, watch } from "vue";

export default defineComponent({
	setup() {
		const chartOptions = ref<any>({
			chart: {
				type: "donut",
				events: {
					click: function (event: any, chartContext: any, config: any) {
						console.log("click");
					},
					dataPointSelection: function (event: any, chartContext: any, config: any) {
						console.log("dataPointSelection");
					}
				},
			},
		});
		const series = ref<Array<number>>([40, 50, 60, 70]);

		return {
			chartOptions,
			series,
		};
	},
});
</script>

<template>
	<div class="overviewChart">
		<apexchart type="donut" :options="chartOptions" :series="series"></apexchart>
	</div>
</template>

Versions:
"apexcharts": "^3.44.0",
"vue-apexcharts": "^1.6.2",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant