2 Replies Latest reply on Aug 11, 2015 11:51 AM by gigasaurus

    How to create Basic Bar Graph or Pie Chart from a database table

    gigasaurus Level 1

      I have a database table where users have indicated their interests, and I'd like to understand the simplest way to generate a graph of the data.


      Most of the data in this survey was gathered in the form of checkboxes, and in the database I entered a "1" if they checked the item, or a "0" if they didn't.  So the table might look like this:


      field          value


      apples          1

      oranges          0

      pineapples          0

      bananas          0


      dogs          1

      cats          0

      birds          0



      The user above only likes apples.(for fruits) and only likes dogs (for pets)


      Is there a simple way for me to display the results for all users in the database (for all fields).


      bar and pie charts would be great. I'd like to do this using CF tags in my code.


      Thank you