On what table is the layout for your chart based?
If you place c_OurCosts and c_ProjectValue on your layout, next to the pie chart object, do you see the expected values?
I have the chart in the projects table layout. The values are on the same layout.
The example project I mentioned earlier is showing:
c_ProjectValue = $9,010.00
c_OurCosts = $4,410.63
So you can see that the cost value is almost half of the project value. I have attached screeshot showing the pie chart and values together.
Your chart is charting correctly.
With OurCosts = 4,410.63, the chart is displaying:
4,410.63 / ( 4,410.63 + 9,010) * 100 = 32.86%
9010 / ( 4,410.63 + 9,010) * 100 = 67.14%
OK. So I guess the better question is how do I show the profit on return calc in the pie chart along with our costs?
The Profit on Return field uses this calc:
(c_OurCosts / c_ProjectValue) * 100
Math is not my best subject and this is getting hard to wrap my head around...
Each item charted has to be a "part of the whole" in a pie chart and the "whole" has to be the sum of the charted values.
Try charting c_OurCosts and c_ProjectValue - cOurcosts as your two delimited values. That makes c_ProjectValue the "whole".
Ok finally figured out:
I created a new calc field that takes the Project value and minus the costs.
Then the piechart uses the new field and the our cost field.
Now I get 51 to 49 % ranges that I was looking for.
Thanks for your help!
You don't actually need the calc field though that works. You can just create the calculation in the delmitted value expression specified for this chart.
Thanks Phil that makes sense.
Oh one more related question
How would you hide a chart like this if no values are present in the fields?
Right now it show exactly 50/50 if the values are empty. Thought it would be better interface to have the pie chart empty in that case.
You might hide the chart inside an invisible tab control with two panels, one empty and one with the chart. If you give each tab panel an object name, the OnRecordLoad script trigger can run a script that uses Go To Object to specify the appropriate panel.
Tab controls can be made invisible by specifying o width borders and a color that matches the layout color. You use the Name box in the Inspector's position tab to give layout objects object names.