EXAMPLES - DATA VISUALIZATION Pages

These pages demonstrate Entry Results Data Visualization for GravityForms Survey, Quiz and Polls Add-Ons.

Chart

The Chart.js library is used for Entry Results Data Visualization.

The Chart tag provides Chart rendering. For more information please see Chart module documentation.


GFChartData

The GFChartData tag provides different GravityForm results data for the Charts.

Example:

<List name=background_color>
  <Item>rgba(255, 205, 86, 0.5)</Item>
  <Item>rgba(75, 192, 192, 0.5)</Item>
  <Item>rgba(153, 102, 255, 0.5)</Item>
</List>

<!-- line, bar, radar, doughnut, pie, polarArea -->
<Chart type=line fill=true background_color="{Get list=background_color}" border_color="[#bf2977, #537bc4, hsla(9, 100%, 50%, 0.81)]">
  <GFChartData form_id="52" field_id="[1,2,3]" source="survey"/>
</Chart>



Result:



GFChartData Attributes

  • form_id - (mandatory) A Form ID which Data should be be used in Chart
  • field_id - (mandatory) A Field IDs which Results should be rendered in the Chart. string or array
  • source - (mandatory) Data source type - 'survey', 'quiz' or 'poll'
  • entry_id - (optional) Entry id(s) for which we display data - string/array
  • user_id - (optional) User ID(s) whose entries we want to display - string/array or "current"
  • multi_labels - (optional) Whether to show multiple labels on axis - might be handy when fields which render in chart do not have identical choices - default:false. See this Example
  • score_frequencies - (optional) When "true" displays Quiz Score Frequencies - applicable only to Quiz Add-On
  • grade_frequencies - (optional) When "true" displays Quiz Grade Frequencies - applicable only to Quiz Add-On