6 Replies Latest reply on Nov 3, 2013 2:14 PM by jbrown

    Chart legend

    dburnham

      I have a chart (column chart) in a sub-summary part where the X-axis is correctly displaying the values in a set of 20 records. I expect that the Legend will identify each of the bars (each bar corresponds to one record) by its name.

       

      When I first began working with the chart, the legend displayed all 20 colors, each one tagged with the corresponding field value. Now, I can only see one record in the legend. That is, I cannot get the legend to display the identification of all 20 records.

       

      But if I switch it to a pie chart, all the labels appear correctly in the legend.

       

      Can't figure out what to look for in the chart setup; there doesn't seem to be an option other than to identify the data series to be used for the legend. I don't know why a pie chart shows all the records, but a column chart does not.

       

      What am I missing?

        • 1. Re: Chart legend
          mikebeargie

          any chance to post a sample file? screenshots?

           

          It sounds to me like your context or data somehow changed and is now invalid.

           

          Suspects:

          1) Make sure you're sorting to what your subsummary is based off of.

          2) Make sure your chart is set to the proper context. IE "display delimited records from found set" vs. "current record". (data source section of chart builder). Also make sure "summarized groups of records" is checked.

          3) Make sure your chart isn't overlapping outside of the containing part of the layout.

          • 2. Re: Chart legend
            dburnham

            Thank you Mike.  I may give up on this one.  Oddly, I found yesterday after posting this question that if I switch from a column graph to a pie chart, the legend re-appears.

             

            The reason I favored the column chart is because (unlike iWork) you cannot control the position of the data labels.  If you have more than a few pie slices and if some of them happen to be small, the text overlaps itself and the graph is rendered meaningless because it's illegible, even with the very smallest font size selected.

             

            I am certain that the sort is correct, because in Preview mode I can see the individual records in the body part (which might be eliminated once I get the graph looking correct) and the sub-summary beneath the graph shows correct totals.  I get the same graph results whether the chart is placed in the sub-summary above or below the body part.  The context is also correct, at least in terms of the setting for "display delimited records vs. current record, however it's also true that the behavior may be ignoring that setting.

             

            In the screen shot below you can see the columns are correctly displaying the data points but the legend is only presenting the color and label for the first column.

             

            Don't waste any time on this; it's unimportant to me; I was just curious.  For the project I am working on, I will just export data and build the graphs in iWork because it is static data that is not going to change.  It just needs to be used for reference now and again.

             

            thanks!

            Screen Shot 2013-11-03 at 9.16.45 AM.png

            • 3. Re: Chart legend
              mikebeargie

              You only have ONE data source in your X axis. A legend is designed to show multiple data sources along an axis.

               

              IE If you had "Employed" and "Unemployed" as two data sets, then for each data set, you grouped by "Armed Forces" and "Civilian".

               

              Your column chart would be four columns:

              -Employed Armed Forces (color 1)

              -Employed Civilians (color 1)

              -Unemployed Armed Forces (color 2)

              -Unemployed Civilians (color 2)

               

              And your legend would then show "Employed - color 1", "Unemployed - Color 2".

               

              So in your context, you only have a single data set, which is defaulting to the top value of your list (employed). That's why the legend is only showing that one value.

               

              In a pie chart, each slice is treated as it's own data set, which is why that charting is correct with one data set.

              1 of 1 people found this helpful
              • 4. Re: Chart legend
                dburnham

                OK .  I get what you're saying .. but when you specify a data set for the X axis, you have the choice of either a field name or a calculation.  I chose the field name that gave me the 6 different columns you see in the chart, each one with its correct field label beneath the column and the correct "height" corresponding to the value in the field.

                 

                How should I have otherwise specified the X-axis data set?  Are you saying that I need to create a self-relationship?  I can surely do that, but it seems to me that it would defeat FileMaker's intent to make charting so easy that even a dummy like me can do it!

                • 5. Re: Chart legend
                  jbrown

                  Afternoon,

                  It seems to me that all of the labels under the bars in your picture are types of Employment Status. That's why the legend says the same thing.

                   

                  The legend is needed for when you have two sets of data, as people are suggesting for each label underneath a bar, bascially when you're building a double bar graph, Over each label of the bar graph you would have 2 or more bars, each representing different set of data.

                   

                  For example, the x axis could be "Candy bars" with labels of "Kit-Kat", "Snickers", etc.  Over each one of those I have a blue bar to represent the number of boys that like that candy, and a red bar to represent the number of girls that liked that candy.

                   

                  For that example, you have two series of data: Boys and Girls. Then the Legend would activate and you'd see the legend showing a blue square for the "boys" and red square for the girls.

                   

                  jb

                  • 6. Re: Chart legend
                    jbrown

                    In this first picture that I've attached, I have two different SERIES of data: Positive and Negative. Since they're different counts for each week, i need the two series and thus I need a legend so it is clear which color represents which type of data.

                    (As a math teacher, I know a bar graph is wrong to show counts over time, but I changed it to a bar graph to better illustrate the two series of data).

                     

                    The 2nd pic, only shows one series of data, so I don't need a legend. All the bars represent the same type of data: Buckets that teachers fall in.

                     

                    GraphSummary.PNGPic2.PNG