Chart to show what percentage X field represent from Y field

Hi guys i'm very new to skuid and this community ,hopefully someone can help me :)

This may be simple , but cannot figure it out for the life of me....

I have 2 number fields for the same record

X (represents the grand total) 
Y (represent another number)

I want to be able to show on aDonut or Stacked column the % Y represent compared to X


X = 1000
Y = 300
The Donut chart would show both Slices and the Big percentage in the middle would show 30%

Or a stacked bar, where Y would show in a different color (30% of the column would be blue fopr example, and the other 70 would be red...)

I hope it make sense

Thank you in advance!


Check out this topic on adding additional series to your charts.

You don’t yet have the comparison as data in your chart, so you need to run a before render snippet to do that comparison and create a new series. 

Another idea.  (These things usually come to me as I’m going to sleep…)  Make the percentage data part of your model using formula fields in salesforce or UI only fields in your model.  Then you’ll have the data together and can simply build different series on your charts to show the stack. 

This is the way to go! Much more flexible than a before render snippet, because the before render snippet doesn’t run again when model data changes (unless that changed in Banzai?), but your ui-only formula fields do update with model changes.

Great, ty very much guys, i’m trying to get those charts going , and so far so good :slight_smile:

Now trying the drilldown part , which seems like a lot of fun :smiley:

Thank you for all your help