Forum Discussion

CeceliaMartin's avatar
CeceliaMartin
Qrew Cadet
5 years ago

Multiple fields into a pie chart

I have several fields that I want to show a pie chart. 

 Field  Percentage
Bargain TY 20%
Music TY 3%
DVD TY 4%
ETG TY 40%
SHC TY 31%
General TY 2%
  100%

I would like to show something like this. 


But since they are separate fields, I am struggling on how to do this.

(below example of field)


Unfortunately the above is just a sample, I actually have about 25 fields to compare and would like to show in a pie chart.

Suggestions?


------------------------------
Cecelia Martin
------------------------------

1 Reply

  • To make a pie chart you would need to have individual records.  So let's make that happen.  Set up a special table to make this pie chart so it would just have a two fields, one for the for the values and the other for the labels.  It might be easiest to set up a parent record to hold these records as we will need to push a button to get the chart to update.

    Create an Automation that will trigger off a date time field being updated. 
    The first step will be to delete the records and then 25 steps to recreate the records.

    To get the Automation to trigger you can have a date time field being updated and then use this technique to refresh the page slowly after the Automation has had a chance to run.

    var text URL = URLRoot() & "db/" & dbid() & "?act=API_EditRecord&rid=[Record ID#]
    & "&_fid_6=" & URLEncode(now());


    "javascript:" &
    "$.get('" &
    $URL &
    "',setTimeout(function(){" &
    "location.reload(true);" &
    "},10000));"
    & "void(0);"; 

    // 10000 = 10 second delay

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------