Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Simple Pie Chart Problem

Featured Replies

Suppose field A is a calculation field that has a value of 4, and field B is a calculation field that has a value of 1, should I expect a pie chart that shows these two values to show A = 80% and B = 20%? If so, I'm not. The chart is formatted to show data from current record (delimited) as the chart is on a layout that is set to form view. I'm not sure whether the chart works out the percentages automatically or I need to define calculation fields to do this. Thanks in advance.

  • Author

Thanks Comment. The reason why it was failing is below. I had both fields as entries in the values, didn't realise they needed to be combined by calcaulation even though the label data is done that way. Leads me to ask why you can add multiple value data and only one label?

ChartIssue.jpg

A little issue I've noticed is that when I use the 'Select Year' pop up menu to choose the year, the chart doesn't refresh even though the values that the chart is based on change straight away. Do I somehow need to trigger a script to refresh window (Train Driving Instances table) and flush cache join results? I've uploaded my file.

Management Staff - Train Driving.zip

why you can add multiple value data and only one label?

That's not an an accurate observation. The labels data calculation returns two return-delimited values - and so does the values data calculation.

I use the 'Select Year' pop up menu to choose the year, the chart doesn't refresh

I guess it's because the chart doesn't "know" it depends on the YearID field. Try changing the values data calculation to =


Let ( 

trigger = Management Staff::YearID

;

Management Staff::Driving Instances Required & ¶ &  Management Staff::Total Driving Instances

)

  • Author

That's not an an accurate observation. The labels data calculation returns two return-delimited values - and so does the values data calculation.

Could you add some more instances of value data to your original attached file to show me please?

  • Author


Let (

trigger = Management Staff::YearID

;

Management Staff::Driving Instances Required & ¶ & Management Staff::Total Driving Instances

)

Worked a treat, thank you. Would this be a custom function? How does it work?

Do you mean like this?

I didn't quite mean that. In the value data window, you can use the + button to add more entries to the window. I just wondered when you would have multiple entries.

Would this be a custom function? How does it work?

No, it works by referencing the YearID field - thus forcing a redraw when the field is modified.

In the value data window, you can use the + button to add more entries to the window. I just wondered when you would have multiple entries.

With a pie chart, never.

  • Author

No, it works by referencing the YearID field - thus forcing a redraw when the field is modified.

With a pie chart, never.

What type of chart then?

Any type that supports multiple series (in version 11, this means any type except pie chart). See the attached example.

Series.fp7.zip

  • Author

Any type that supports multiple series (in version 11, this means any type except pie chart). See the attached example.

Thanks for the explanation :smile:

  • Author

I've been playing with your series example again. I guess series means multiple values in the same field seperated by a carriage return? If I remove all the values but one then the lines on the chart disappear. Therefore can the line chart only be used with series data?

I guess series means multiple values in the same field seperated by a carriage return?

Series means multiple values that describe one line in a line chart. A line chart can have multiple lines, and each series describes one line.

A series can be return-delimited values, or values of the found set or the related set - as defined in the chart setup.

  • Author

Series means multiple values that describe one line in a line chart. A line chart can have multiple lines, and each series describes one line.

A series can be return-delimited values, or values of the found set or the related set - as defined in the chart setup.

Current record, with one value in one field wont be series will it?

In your example, using one field to store multiple values wouldn't be regarded as standard good database practice would it? In theory would you obtain this by using the List function across the required set of records?

Current record, with one value in one field wont be series will it?

Well, one value can only describe a point, not a line.

using one field to store multiple values wouldn't be regarded as standard good database practice would it?

It depends.

In theory would you obtain this by using the List function across the required set of records?

The List() function will only work across a related set of records - and the same effect can be achieved by pointing the chart to the related set directly. But if you wanted, for example, to chart the related set against a set of return-delimited values, then List() could be a good choice.

  • Author

Well, one value can only describe a point, not a line.

cPlanned Occurrences and cActual Occurrences are both summary fields based on a count. Two values to give a line but both in seperate fields, should this work on a line chart?

I am afraid that description is too vague. Why don't you experiment for a while with what you have already?

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.