All shortcode parameters

All shortcode parameters

Here is the list of all shortcode parameters, briefly described, see examples for further explanations:

  • gf_form_id : expects the form ID in Gravity Forms (defaults to first form : id=1)
  • type : is the type of graph, at the moment only line,pie,doughnut,bar,horizontalBar available (defaults to pie)
  • include : expects the field ids to include (example : include="1,3,4")
  • exclude : expects the field ids to exlude (example : exclude="2,4,6")
  • color_set : expects the name of the color set : blue,green,red,orange,purple (defaults to a standard color set including different colors)
  • color_rand : expects true or false and randomizes colors in color set if true (defaults to false)
  • width : set width of graph(s) in pixels or percent (width=”100%” or width=”250px”), height will be adjusted automatically
  • float : (defaults to false) if true set float:left property to graph div container, and allow multiple column display
  • center : (defaults to false) if true set center graphs inside container
  • maxentries : by default, maximum 200 entries are retrieved from the gravity forms database, increase at your own risk (performances)
  • chart_js_options : JSON like string like : title: {display: true, text: ‘My Funky Chart Title’}. Use to surround string parameters. See here for more informations
  • tooltip_style : Control tooltip content, SUM displays total count of answers, PERCENT the % ratio among all answers, and BOTH displays both 🙂
  • custom_search_criteria : provide custom search criteria for gf submission query, for example custom_search_criteria='{“status”:”active”,”field_filters”:{“0”:{“key”:”created_by”,”value”:”current”}}}’

About The Author

Comments (7)

  • Joe Black

    Custom Search Criteria – Filter by Field Values – conditional logic

    I need to display (conditional logic) results: display only if form field {email:3} entries equals current user’s username.
    I was trying something like this, but is not working (I was just guessing 🙂

    custom_search_criteria='{“field_filters”:{“0”:{“key”:”email”,”value”:{“current_user”:”user_email”}}}}’

    Thank you for your help

  • admin

    There is no conditional logic on showing the graph or not, it will always display unless there is an error.
    However, you can show answers for current user only by filtering like the example above :
    custom_search_criteria='{“status”:”active”,”field_filters”:{“0”:{“key”:”created_by”,”value”:”current”}}}'
    This will show stats for forms submitted by current user only.

  • Joe Black

    I did not explain myself correctly, sorry.
    I want the graph to show all the time, but only the values if they are from ”current” and the ”user_email” = form field {email:3}

    Thank you 🙂

  • Casper

    Math?

    Could I have a bar chart with user input value in one bar and calculations in an other?

    Like bar #1 user input value
    bar #2 User input * 2
    Bar #3 user input * 4 – 3

    ?

    Awesome work mate!👍

    • Gravity Forms Charts Reports

      At the moment, no, it is not possible, but your suggestion is interesting and i will think about it quickly and go back to you.

    • Gravity Forms Charts Reports

      Can you explain a bit more what you want ? A text (number?) filed as input in the form ?
      Then calculations made on this only value entered by user ?
      Thanks

Leave Comment