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

Line Chart with Multiple Series and any of the click events fails to handle > 1 data point, as does hover. #4778

Open
mdhampton opened this issue Oct 29, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@mdhampton
Copy link

mdhampton commented Oct 29, 2024

Description

I'm creating a line chart, with 4 series. Several of the X axis points happen to have the same Y value. If I have any click event (OnClick, OnDataPointSelection, OnSelection, OnMarkerClick, OnXAxisLabelClick, OnMouseEnter) markers are automatically added. However, this has several problems:

  1. Hovering over a datapoint that happens to be in more than one series, only the last is ever shown.
  2. The click events as well only ever report the one point.

It seems to work OK on bar charts, it is just line charts with intersecting data.

This is using a blazor server side application (interactive render mode) under .net 8.

Steps to Reproduce

  1. Have a line chart with multiple series, with more than one datapoints intersecting.
  2. Click on one of these points.
  3. Your event handler will only get one datapoint.
  4. The hover will only display one datapoint.

Expected Behavior

  1. Hovering over a point on a chart that has multiple datapoints should show both.
  2. Clicking should provide both points.
  3. Document what events are exclusive of others, if any.

Actual Behavior

  1. Only last datapoint shown on hover.
  2. Only last datapoint provided to handler.
  3. Disappointed developer.

Screenshots

image

Reproduction Link

I didn't create a code pen, not sure about event handling in it. I do have a github project with example code in a standalone, server side application.

https://github.com/mdhampton/BlazorApexChartsTesting.git

In case url is stripped, search for BlazorApecChartsTesting, for user mdhampton.

@mdhampton mdhampton added the bug Something isn't working label Oct 29, 2024
@mdhampton
Copy link
Author

As a note, messages are logged to console and text file. I find it useful to have consol open next to application to see what events are happening.

@mdhampton
Copy link
Author

Oops. I created this in the wrong apex charts project.

@junedchhipa
Copy link
Contributor

Please provide a minimal reproducible Codepen (plain html/css/js)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants
@junedchhipa @mdhampton and others