Solved : Hovering over Chartjs Bar Chart Showing Old Data In Angular

chartjs-in-angular6

Hello to all, welcome to the therichpost.com. In this I will tell you how to Solved : hovering over Chartjs Bar Chart showing old data In Angular?

I am doing this code in Angular 6.

Chartjs is the very popular for barchart, line chart and many more. I was facing one problem during working with chartjs in my Angular application. When I change my chartjs bar chart event then hover again, It was showing me old data and this was the big issue for me but I am able to solved this and today I am sharing that code with all of you.

Here is the code for solved hovering over Chartjs Bar Chart showing old data and you can add this into your app.component.ts file:

window: any;
if(this.window != undefined)
this.window.destroy();
this.window = new Chart(this.ctx, {});

 If you have any query related to this post, then do comment below or ask questions.

Thank you

Therichpost.com

 

Comments

21 responses to “Solved : Hovering over Chartjs Bar Chart Showing Old Data In Angular”

  1. Lems Avatar
    Lems

    thanks man… your the best..

  2. tukaram jahdav Avatar
    tukaram jahdav

    i have same problem please help me

    1. Ajay Malhotra Avatar

      Did you apply this code?

  3. tukaram jahdav Avatar
    tukaram jahdav

    yes i was apply this code but no show the proper result

    1. Ajay Malhotra Avatar

      Email me with you code : therichposts@gmal.com

      I will contact you after some time..

  4. tukaram jahdav Avatar
    tukaram jahdav

    how to apply this code in Angular 2

    1. Ajay Malhotra Avatar

      I shared that one also for angular.

  5. tukaram jahdav Avatar
    tukaram jahdav

    i have line chart this chart work on the click on the search button
    but i don’t have data click on the search button display chart
    so it solve

  6. tukaram jahdav Avatar
    tukaram jahdav

    hello

  7. tukaram jahdav Avatar
    tukaram jahdav

    reopen the same issue please help me

    1. Ajay Malhotra Avatar

      you can share code with me.

  8. tukaram jahdav Avatar
    tukaram jahdav

    send the code please check it send the reply

  9. Tigran Galstyan Avatar
    Tigran Galstyan

    halp my place, a cant do it for react tsx

    1. Ajay Malhotra Avatar

      I will update you.

  10. Rodrigo Vieira Avatar
    Rodrigo Vieira

    Please, help me to solve this with javascript in a ASP.Net/C# solution. The problem keep occuring…

    1. Ajay Malhotra Avatar

      I will update you soon.

  11. Rathna Jayakanthan Avatar
    Rathna Jayakanthan

    Great. Thank you very much.

  12. Rathna Jayakanthan Avatar
    Rathna Jayakanthan

    thank you very much. it resolved my problem.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.