36
Views
1
Comments
Area Chart onClick doesn't trigger if I click outside of filled alrea
Question

Greetings,

I'm looking to create an area chart featuring two distinct series that are clickable throughout the entire chart, returning the Y value of a particular series. However, I've encountered an issue where it only works when clicking on the line or filled area. I've already tried some solutions that I found on the Highcharts library, but they don't work. Does anyone have a solution for this issue, and is it feasible to incorporate an onHover handler as well?

2023-05-30 10-05-13
Lourenço Matalonga

Hi @Edgar Alves ,

To address the issue of the onClick event not triggering when clicking outside the filled area of an area chart in OutSystems, you may need to modify the chart's event handling properties. If modifications directly in OutSystems are not working, consider these potential solutions:

  1. Extend the clickable area: Adjust the chart configuration to make the areas surrounding the lines clickable.
  2. Custom JavaScript: Use a custom JavaScript code that overlays a transparent element over the entire chart area to capture clicks.
  3. Highcharts API: If using Highcharts, explore the API for options to detect clicks on the plot area rather than just the series.

For the onHover handler, you can typically use the plotOptions of the Highcharts API to define hover effects and behaviors for the series or points.

Hope this helps.

Lourenco Matalonga

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.