13 Replies Latest reply on Jan 31, 2011 4:48 PM by AdrianGorman

    Pie Chart



      Pie Chart



      I am not sure if this is possible but - I have 2 peices of data in a training database:
      1 in a field called TotalHoursRequired (which is for the total amount of hours required to complete the training package - this is auto entered data),

      The other data is in a field called HoursCompleted ( which is the amount of hours the student has completed to date towards the total required and added by me as the hours are built up)

      I want to produce a Pie Chart that shows the progress of the student's accumulated hours - with the full pie representing the TotalHoursRequired, and the slice reperesenting the HoursCompleted. So as the student completes more hours the slice grows to give a representation of their progress. (a similar look to the 'Windows' hard drive properties Pie Chart that shows space availabe/space used)

      I cannot figure out how to do this and would appriciate some help.


        • 1. Re: Pie Chart

          You'd need a data series of two values--one value would be the fraction of total hours completed (HoursCompleted / TotalHoursRequired ) and the second would be the remaining hours: TotalHoursRequired - ( HoursCompleted / TotalHoursRequired ) 

          A calculation field that puts these two values in a list, should work as the data series, I think (haven't tested this):

          List (HoursCompleted / TotalHoursRequired ; TotalHoursRequired - ( HoursCompleted / TotalHoursRequired ) )

          • 2. Re: Pie Chart

            Thanks for that answer - but it is a bit over my head. I guess what I was trying to achieve is more complex than I first thought.


            • 3. Re: Pie Chart

              What I am describing would use the "Current data (Delimitted data ) " option in the "use data from" drop down. (The delimitted data, would be your calculation field that uses the List function.)

              • 4. Re: Pie Chart

                Thanks again. I am a novice at this but am learnign as I go along. I have not had call to use 'value lists'.

                I have just got my head around using Filemaker Pro Advanced Server, and thought a pie chart would be a good addittion to my training db.

                I have created a new test db with 1 table and the 2 fields (HoursCompleted and HoursRequired) for me to try to figure out 'data series' and 'value lists'

                Thanks again for your help

                • 5. Re: Pie Chart

                  Technically, this is a list of values in a calculation field, not a "value list"--which is something that you'd define in Manage | Value Lists. Wink

                  • 6. Re: Pie Chart

                    Would you like a commission ??????

                    • 7. Re: Pie Chart

                      Not necessary, If this is all you need. I've been plowing through the "Monday back log" and haven't had time to play with this Idea. I've been making a suggestion based one previous projects and something that I recently read in the FileMaker training series Manual. Let me play with the idea in a demo file and upload it in my next post for you to take closer look at and so that I can confirm to my own satisfaction that this idea will really work like I think it will.

                      • 8. Re: Pie Chart


                        • 9. Re: Pie Chart

                          OK, after a little playing around, I'm not only satisfied that the concept works, but that it can be simplified.

                          1. Enter Layout Mode
                          2. Use the Chart tool to draw a square on your layout for your pie chart.
                          3. Select these options:
                            ChartType: Pie
                            In "Use Data From", select Current Record (Delimitted Data)
                            For Label data, select the calcultion option and enter and expression such as this: List ( "Hours Completed" ; "Remainder" )
                            For the value data, enter this expression: List ( YourTable::HoursCompleted ; YourTable::TotalHoursRequired - YourTable::HoursCompleted )
                          4. Just make sure the order to your lables matches the order to your series of values in the value data so that the correct values get the correct labels in the pie chart.
                          5. Since you only have two sections to the pie chart, you can probably click Format Chart, select Legend and clear the legend check box.
                          6. Now enter browse mode and test.

                          Note that in this version there is no special calculation field. I've replaced it with a simplified calculation that I have entered as part of the Chart's set up information instead.

                          The demo file:  http://www.4shared.com/file/rv6uDTkq/PieChartSingleFractionDemo.html

                          • 10. Re: Pie Chart

                            Thankyou so much for that. I have downloaded it and it looks so tidy. I really do appriciate your effort.


                            • 11. Re: Pie Chart

                              I have been running this in my actual db and it is perfect - only blip seems to be when the HoursCompleted field is blank (no hours yet recorded) the chart sees this as 100% complete with 0 % remaining.

                              • 12. Re: Pie Chart


                                You can either set the field to auto-enter a zero or modify your calculation to read:

                                List ( YourTable::HoursCompleted + 0 ; YourTable::TotalHoursRequired - YourTable::HoursCompleted )

                                • 13. Re: Pie Chart

                                  added the +0 and it is now perfect.

                                  Thanks again