Home Forums Chart Support Charting the frequency of a value

Charting the frequency of a value

Viewing 5 posts - 1 through 5 (of 5 total)
  • #29141

    ive looked extensively on the support forum but i cant find an answer.
    my csv is simple – row0 is text headings (survey questions). each subsequent row contains answers to the questions, which can either be integer or text depending on the question of that column. The number of possible values in each question is fixed (no survey question is free text).
    for each column / question, i just need a pie or bar chart to show how many of each response there is in the whole row.
    is there any script that can count the frequency of each response and put that on the graph, rather than just plotting each individual value which is what is happening now.

    • This topic was modified 3 years, 4 months ago by billyqureshi.


    Can you please share your sample data over Google-Drive or Onedrive and brief us further about your requirement so that we can understand your scenario better and help you out.

    Indranil Deo
    Team CanvasJS


    Hello. Thank you for your answer.
    I have attached a Dropbox link to the data.

    Each column is a survey question. Each question has only a certain number of possible answers.

    For each column, I need a plugin to count how many times each of the different answers are present, and then plot the count on a pie chart.

    So if column name was for example “what is your favourite colour”
    And the rows contained


    The graph would see that there are 4 different answers and would count each of them.

    The pie chart would graph


    • This reply was modified 3 years, 4 months ago by billyqureshi. Reason: Typing error


    Counting the number of occurrence of colors and parsing the data in the format accepted by CanvasJS should work fine in your case. Please take a look at this JSFiddle.

    Indranil Deo
    Team CanvasJS

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

You must be logged in to reply to this topic.