GithubHelp home page GithubHelp logo

Comments (5)

hubertkozik avatar hubertkozik commented on June 22, 2024 1

Hi @charmbv!

The mentioned issue is not fixed. The context of the plotline mouseover/mouseout functions is not passed correctly.

Internal note:
There are differences between minified and non-minified code. Please, check the demos below. FYI @MarkusBarstad console.log is giving different objects (this).

Minified: https://jsfiddle.net/BlackLabel/5cLuqgr4/
Non-minified (src version): https://jsfiddle.net/BlackLabel/o97suLkg/

I think it is related to the usage of the arrow function, which is transpiled to a normal function, and the context is changed:

from highcharts.

hubertkozik avatar hubertkozik commented on June 22, 2024

@charmbv, I think I got a cache issue last time, when I was debugging your case because now everything is working correctly.

Can you create a demo with the reproduced issue in some online editor?

from highcharts.

charmbv avatar charmbv commented on June 22, 2024

I will try to create a sample application. Will post a link here when I have something.

from highcharts.

charmbv avatar charmbv commented on June 22, 2024

As usual, when trying to create a sample project it "suddenly" works. However, I still get an error that I can't figure out how to solve. I'm using the following code (adapted from https://jsfiddle.net/BlackLabel/3k216ywa/) to show the tooltip at the place of the event:

private showPlotLineTooltip(plotLine: any, event: any) {
  const series: Highcharts.Series = plotLine.axis.series[0];
  const chart: Highcharts.Chart = series.chart;
  const tooltip: Highcharts.Tooltip = chart.tooltip;
  const point: Highcharts.Point = new Highcharts.Point().init(series, {
    value: plotLine.options.value,
  });
  const normalizedEvent: any = chart.pointer.normalize(event);

  (point as any).tooltipPos = [
    normalizedEvent.chartX - chart.plotLeft,
    normalizedEvent.chartY - chart.plotTop,
  ];
  (point as any).showPlotLineTooltip = plotLine.options.showPlotLineTooltip;

  tooltip.refresh(point as any);
  }

This works when using Highcharts 11.2.0 but fails with 11.4.0 on the new Highcharts.Point().init(...) line. Any idea on how to fix this?

from highcharts.

hubertkozik avatar hubertkozik commented on June 22, 2024

@charmbv, you are trying to create a dummy point by using init method, which is not supported now in Highcharts, you can check the Pull Request here: #20286

Now, you should create the dummy point as a normal constructor. This is not a bug, it is intended. Feel free to reach out to our other support channels, for example Highcharts forum, where our support engineers will help you with the configuration of your chart.

from highcharts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.