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

Error when resizing window #4

Open
cabrinoob opened this issue Apr 30, 2019 · 1 comment
Open

Error when resizing window #4

cabrinoob opened this issue Apr 30, 2019 · 1 comment

Comments

@cabrinoob
Copy link

Hi, I'am trying to use you angular component fot metrics-graphics lib, and everything works fine except the following lines :

@HostListener('window:resize') onWindowsResize() {
    this.isLoading = true;
    setTimeout( () => {
      this.config.width = this.chartContainer.nativeElement.clientWidth;
      this.drawMGChart(this.config);
    }, 0)
  }

So, when I resize the window, drawMGChart is called again and pops this error :

ERROR TypeError: existing_line.transition is not a function
    at mg_add_line (metricsgraphics.js:4422)
    at mg_draw_all_line_elements (metricsgraphics.js:4821)
    at mg_line_main_plot (metricsgraphics.js:4855)
    at lineChart.mainPlot (metricsgraphics.js:5043)
    at lineChart.init (metricsgraphics.js:5033)
    at new lineChart (metricsgraphics.js:5146)
    at Object.MG.data_graphic (metricsgraphics.js:833)
    at mgChartCmp.ts:58
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:391)
    at Zone.push../node_modules/zone.js/dist/zone.js.Zone.run (zone.js:150)

FYI, I'am using metrics-graphics v2.15.6 (and angular 7.2.0)

thank you

@YagoLopez
Copy link
Owner

Probably the error has to do with with the use of new versions. I can only warranty my code is working in the versions it was developed and I have no time right now to mantain the project. If you want you can search the error by Google and I can give you permission to help to maintain the code. Probably this is related to a new version of Angular.

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

2 participants