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

Discussion on #Topics/Chart/Advanced/Hit-Testing #3

Open
theflasherman opened this issue Jul 10, 2021 · 0 comments
Open

Discussion on #Topics/Chart/Advanced/Hit-Testing #3

theflasherman opened this issue Jul 10, 2021 · 0 comments

Comments

@theflasherman
Copy link

Hi

I'm adding a dblclick handler, e.g as follows (from Vue snippet):

this.chart1.hostElement.addEventListener('dblclick', (e) => {
var hti = this.chart1.hitTest(e);
console.log("hti", hti);
console.log("e", e)
console.log("ce", hti.chartElement);

    if(hti.chartElement == wjcChart.ChartElement.PlotArea && this.chart1.selection != null)
    {
      this.drilldown(this.chart1);
    }
  });

the hit test, when clicking on a column chart bar is returning a hit.chartElement of 0, which is the enum for PlotArea. I would have expected this to return 7, the enum for Series (as per here: https://www.grapecity.com/wijmo/api/enums/wijmo_chart.chartelement.html#series )

The console output I get from above is:

_hti HitTestInfo {_pointIndex: 86, _chartElement: 0, _chart: FlexChart, _pt: Point, _series: Series, …}
e MouseEvent {isTrusted: true, screenX: 939, screenY: 634, clientX: 939, clientY: 563, …}
ce 0

So, you can see that ce = 0, when I'm definitely click on a bar in a column chart.

I'm getting around this by adding in the selectionMode = 'Point' and handling if this.chart1.selection != null currently, but I'm a bit worried that if this is a bug and I upgrade this will not work. I'd appreciate

Thanks
Brian


Topics/Chart/Advanced/Hit-Testing

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