3 Replies Latest reply: Aug 25, 2017 5:55 AM by Sunny Talwar RSS

    Drawing a bar graph with a difference

    Braham Edwards

      Evening all

      I would appreciate some assistance with drawing a bar graph with a bit of a difference. Our customer fill in a questionnaire where there are some questions asking for a Yes/No response around their health status. There a question that asks if they have diabetes, another that asks if they have hypertension, another one that asks if they have high cholesterol, etc. I want to represent this in a bar graph where each bar on the graph will be for each question that was answered. The bar will simply show the percentage of customers that answered Yes for that question. In this example I will have a bar graph with 3 bars, one for diabetes, then next for hypertension and the last for high cholesterol. Each bar will show the percentage of customers that answered Yes to that question.

       

      The input data would look like this (I have excluded the other fields that are not relevant to this question)

       

      Customer NoDiabetesHypertensionHigh Cholesterol
      1YesNoYes
      2NoYesYes
      3NoNoYes
      4NoYesNo
      5YesYesNo
      6NoYesNo

       

       

      The bar graph's 3 bars would have the values, Diabetes:33.3%, Hypertension:66.7% and Cholesterol:50.0%

       

      You suggestions will be most welcome.

       

      Braham Edwards