Home forums Using CanvasJS how to create Multiple Charts on page

This topic contains 23 replies, has 8 voices, and was last updated by  Anne 3 weeks, 2 days ago.

Viewing 15 posts - 1 through 15 (of 24 total)
  • Author
    Posts
  • #4824

    juliusk
    Participant

    how can i create multiple chart (two chart) in one page?

    #4825

    Sunil Urs
    Keymaster
    #6466

    lonwabogiqwa
    Participant

    Hi there,
    is it possible to display charts adjacent to each other like a widget type of thing, say two charts above and two below.

    #6473

    Anjali
    Participant

    Hi

    Can you please give us some link / screenshot that depicts the kinda widget that you want to create?

    #6475

    lonwabogiqwa
    Participant

    i don’t know if it’s a widget or what but here is the link. click on charts in this page: http://dev.sencha.com/deploy/ext-4.0.1/examples/sandbox/sandbox.html i want to display charts in one page like shown here but of course on a full page.

    #6478

    Anjali
    Participant

    Hi,

    Yes, you can plot the chart as mentioned in the link. Because charts just get drawn inside any container you provide, it’s more about designing the container itself. Just design/place the container according to your requirement and pass its id to CanvasJS and chart should get plotted inside the same.

    Here is simple example that I’ve created. You can style it according to your requirements.

    #10449

    ASK123
    Member

    Hi,

    I want to be able to create multiple graphs on the same page where the data to each graph comes from separate CSV files.
    Is it possible to display buttons on the webpage, for each chart to appear, with the on click option ?

    • This reply was modified 7 months ago by  ASK123.
    #10478

    Vishwas R
    Keymaster

    You can use onclick mouse-event to load chart on button click, from multiple CSV files. Here is an example.

    #10544

    ASK123
    Member

    Thank you, Vishwas. How do I load data from multiple csv’s to plot the graph ? I want to send the csv filename as a parameter to the “Processdata” function.

    #10558

    Vishwas R
    Keymaster

    You can load data from multiple CSV using ajax. Here is an example.

    #10559

    ASK123
    Member

    I tried it, it’s not working. Please can you help me with why i’m unable to plot my graphs. Thanks!

    #10563

    Vishwas R
    Keymaster

    Kindly check the example from the fiddle. Here is the screenshot of the working fiddle.

    #10570

    ASK123
    Member

    Hi, my csv data files are in this format :
    Name, x, y
    abc, 1, 4
    def, 2, 1
    ghi, 3, 2
    Please help me with implement.

    #10571

    ASK123
    Member

    File_Link

    This is my code.

    • This reply was modified 6 months, 2 weeks ago by  ASK123.
    #10574

    Sanjoy
    Moderator

    Hi,

    For your csv format you have to use
    dataPoints.push({ x: parseInt(rowData[1]), y: parseInt(rowData[2]), name:rowData[0] });
    and linking to correct CSV should plot your corresponding chart.

Viewing 15 posts - 1 through 15 (of 24 total)

You must be logged in to reply to this topic.