How are the tables and relationships set up? A typical "dashboard" set up uses a layout based on TableA that displays summary data from related tables such as your table of employee leave data. If that's what you have here, you can't base your chart on the dashboard layout's found set.
So have I described your set up correctly or is it something different?
Hi Phil, Thanks for the reply and help. I've uploaded a picture of my relationship layout. I'm trying to adapt a starter solution that I think came with FM 11 or 12. And the dashboard layout that I'm trying to create is based upon the "Time Off" Table. Does this information help. Do I need to base the dashboard layout on Personnel Records Table?
It doesn't match the typical definition of a "dashboard" layout so it's not what I described in my first post.
The bars/points/wedges of a Y series in a FileMaker chart all need to come from the same field so you can't use any of your "c" fields for this chart, but you can use a single summary field.
Set up a summary field to count or total your data. I think that you want total days leave in each category to control the size of each "wedge" in you chart. So a calculation field: End Date - Start Date with a number result type would calculate the daysLeave for each record and sTotalLeave could then be set up to compute the total of DaysLeave. You would use sTotalLeave for your wedge data and set up your data source options to be based on "FoundSet", "summarized data". You must then sort your records by the Type field to group your records by Type. Each wedge will then represent the number of days leave in each type of your found set.
(When charting summarized data, you'll find a number of similarities between sub summary layout parts and your Y-Series, including the need to sort your records.)
Thanks so much for the help with the pie chart which is now working. But it has thrown up some more questions and queries.
When I change a record in the "Time Off" portal which is on the Personnel Records layout, the change doesn't reflect in the chart correctly.
For instance if i edit a record and change its leave type from compassionate leave to sick. I would expect the chart to reflect that change and increase the sick wedge by 1 day and show zero for compassionate leave. Or remove the compassionate wedge completely based on the fact that compassionate leave only had 1 day previously set against it.
But whats happening is the compassionate leave wedge is still showing, but only the type title has changed. So in effect I now have two sick wedges instead of only one.
Is there a way to almost refresh the data before selecting the chart layout? Hope I've explained it clearly enough.
Just resort the records.
God as simple as that...and the only thing I didn't try!...
If i wanted to show just one wedge type instead of "all types" is it a question of filtering the sort list again?
And thank you for taking the time to help me over this.
Wouldn't "one wedge type" produce a solid circle where the width of the wedge = the area of the circle?
Or do you really want two wedges, one for the specified type and one for everything else?
Sorry Phil, yes I meant two wedges.
Maybe my logic is thinking incorrectly. As I would assume that the whole circle would be based upon the number of days leave given to each employee at the beginning of the year, for example 28 days holiday. And that would make up the 100% full circle.
And the second wedge could be the Type "Paid Leave" showing what the employee has actually taken (for example) 3 days.
But what you have guided me through so far has worked perfectly and is more than adequate for my solution. I'm just trying to understand the basics, and see other ways I can improve it. The help files with Filemaker are pretty poor in my opinion and don't really cover any depth of detail.
I've come back to this one again, and you are of course correct that "one wedge type" produces a solid circle. I have been struggling with this pie chart for some time and still can't figure out how to split the pie chart to show two wedges. i.e one wedge showing holiday taken and the other showing holiday remaining.
I have at present sTotalLeaveDuration which summarises all Paid Leave per employee, but does indeed produce a solid circle. How do I add the other wedge into this pie chart, when there is only the option for adding "one data slice" in the settings box?
If the data source option for your chart is "current record, delimited data", then you need a single field or a single expression for your wedge data that includes two values separated by a return character. One would be the leave days taken, the other would be for the leave days remaining (total minus number of days taken).
The list function can be handy for this as it might be something like:
List ( LeaveDaysTaken ; 28 - LeaveDaysTaken )
Of course, you may have a field that can be used in place of the constant value 28.
Thank you very much for that it has worked, this is my calculation
List ( sLeaveDuration Total ; HolidayAllowanceFromPersonnel - sLeaveDuration Total )
Is there anyway of adding text to the calculation so each wedge is descriptive and not just a number and percentage as in the screen shot. I would like for example each wedge to show "leave taken" and "leave remaining".
Before changing to "current record delimited data" I was using related records, (but was a solid circle) and the sorted field name "Paid Leave" showed as a category label.
List ( "Leave Taken" ; "Leave Remaining" )
Use that for your labels data.
Thank you so much for all your ongoing help and expertise, its working great.