Jump to content

Create Piechart from unknown numer of different labels


This topic is 1871 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Without using SQL (that i find cumbersome) I would like to create a Pie chart, with a dynamically list of labels (?!)

I want to do a small analytics using FM. My App, using the FM API, creates a record putting in the FM field "OSversion" the OS system they run in (that can be various, iOS 9.3, 10.1, 11.2, etc)

I am struggling to come up, without looping trough the records, for a calculated field that gives me what i need for the PieChart: that is the total of each iOS version return delimited, no matter how different and how many they could be..

For the labels I can use off course a List from the field "OSversion".

But for the totals, I cannot use relationships, since the next record could be a value (say 14.5) that I did not plan to have.

Is it there a solution?

Thanks

Posted
21 minutes ago, trevix said:

I am struggling to come up, without looping trough the records, for a calculated field that gives me what i need for the PieChart: that is the total of each iOS version return delimited, no matter how different and how many they could be..

You could simply use a summary field defined as Count of [ OSversion ] (or any field that cannot be empty). Define the chart to use data from the current found set, with the option to summarize groups of records when sorted. Use the OSversion field as the category labels and the summary field as the slice data.

To produce the chart, sort the records by OSversion, with reorder based on the summary field (descending).

 

Posted

Opps. Sorry.

I forgot to mention that I am putting together a sort of dashboard.

So there are other values (and PieChart), similar to the one I mentioned: like App version, Hardware type, language and similar.

Beside the time it would take, I would then need multiple sort followed by a set field with the results; almost the equivalent of doing loops. Suppose there are thousands of records...

One thing that baffles me is that, creating a relationship between the "OSversion" field and itself, a subsequent count calculated field and using this as the second field for the List, I can clearly see the total for each value of "OSversion", in the list (see screenshot). I wonder if it is possible to extract it...

Schermata 2020-01-07 alle 18.02.56.png

Posted

Will google it. Thanks

But do you think I would be much better learning how to SQL?

Posted

I think having at least a rudimentary knowledge of SQL would be an advantage. That said, I believe that you should exhaust the native methods before reaching for SQL.

 

This topic is 1871 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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