-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Give datapoint and series indexes to "click" chart event. #1017
Comments
I kind of have a similar problem. Something strange happened, i used to use the I did not update the package. Is there a condition for |
@mikedotJS Which event you used to get |
Yes, the |
It provides the correct |
The code, working pretty well until recently.
|
I just tested on a brand new CodeSandbox and it worked as it did formerly for me. So now the question is : what in my context makes them disappear ? |
Whoa. Just tried destructuring the way you did and it worked! Amazing! Now I'm having another issue. I'm adding annotations using ApexCharts.exec(chartId, 'addXaxisAnnotation', params) in the onClick event. I also check if there is an existing annotations using context.config.annotations.xaxis However, the annotations I'm adding are not showing up here. instead of switching the date and location of the annotation, it's just adding a bunch of new ones, and none of them show up in the context. how can we access the current annotations from the click event? |
I have a question, the dataPointIndex is -1 for the first item. Shouldn't this be 0? |
Hi! How open other detailed chart when I get seriesIndex and dataPointIndex? And how send it's for open new chart with more detailed info? |
Hi! try use example from doc (https://apexcharts.com/docs/options/chart/events/) In config you can find dataPointIndex . But how work with him? I,m use vue-apexcharts too |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
hi everyone. this the chart component : const StackedBarChart = ({ data, width, chartTitle, onBarClick }) => {
}; export default StackedBarChart; const StackedBarChart = ({ data, width, chartTitle, onBarClick }) => {
}; export default StackedBarChart; and this is the parent component: import React, { useState, useEffect } from "react"; const fetchDataSummary = async (key) => {
}; const fetchWardsData = async (key) => {
}; export default function DashboardAnalytics() {
} |
I'm trying to set an annotation on the x axis that displays the date where ever the user clicks.
It's a date, so I need the data from my series, something like how other events give you access to the series and the datapoint and series indices.
The arguments we have access to are event, context, and config. I can't seem to figure out how to access the actual data using that information.
The text was updated successfully, but these errors were encountered: