Home forums Using CanvasJS Multiple canvasjs charts in MVC partial views

This topic contains 3 replies, has 2 voices, and was last updated by  Bivek Singh 1 month, 2 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #12976

    darrenst
    Member

    I need to show 6-7 charts located in different MVC partial views.

    Each pair of charts is located on a separate partial view

    At the moment “Only” the last view is being rendered. I am not much a javascript coder but suspect its the multiple Window.onload functions events that is causing the issue.

    I changed one partial view to call the Document ready event which worked, however I need to show 2 more charts.

    Can you suggest a method to overcome this limitation whilst keeping the chart html and js located withing the partial view.

    many thanks

    #12991

    Bivek Singh
    Moderator

    Darrenst,

    Please check the container IDs. ID should be different for every container. We would need a sample code in order to properly understand the problem and resolve it.

    Bivek,
    Team CanvasJS

    • This reply was modified 1 month, 2 weeks ago by  Bivek Singh.
    #12994

    darrenst
    Member

    Hi, yes the container Ids are unique.

    The issue I suspect is because I am running multiple script tags each with Window.Onload.

    It seems the last Window.onload block is taking prescidence

    please advise.

    #13037

    Bivek Singh
    Moderator

    Darrenst,

    Could you please share your sample application code so that we can understand the issue properly and assist you in a much better way.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.