Pie chart for a single record
I want to display a pie chart within a form, that visualises info contained in numeric fields within a single record of a single table. But it seems no matter how I try to construct the forumla for the Chart view, or how I edit the Colums for it, I can't get anything to display.
For example, see this screenshot, which shows four formula fields containing numbers, for which I want to produce a pie chart:
Is it possible to display a chart with data from a single record?
I would also be interested in this
Peter Amies Peter,
I have an idea ... it's a hack, but it works.
First, the pie chart can only show records. This said, you have to convert your fields into records and voilà:
Pie-Chart is a table like this:
PieChart-Numbers is just that (the "Name" is for the legend, but I haven't figured out how to use it):
Then you need the button "Populate Chart". It creates records based on your numbers. Of course it first has to delete the old entries
delete (select 'PieChart-Numbers'); let z1 := Number1; let p1 := (create 'PieChart-Numbers'); p1.(Number := z1); p1.(Name := "Complete"); let z2 := Number2; (create 'PieChart-Numbers').(Number := z2); let z3 := Number3; (create 'PieChart-Numbers').(Number := z3); let z4 := Number4; (create 'PieChart-Numbers').(Number := z4)
For the pie chart itself the config is:
(where "Kreisdiagramm" = "pie chart", "Datenreihe" = "data row", and "Spalten" = "columns" in english)
You have to update the chart manually, but you'll have your chart. If you know how to handle the legend ...
Another approach is to use google charts. https://developers.google.com/chart
Google Charts is open source and is free to use.
Lots of different chart types possible!
Code in the formula field (to copy/paste):
- Status Answered
- 1 yr agoLast active