Forum Discussion
2 Replies
Sort By
- _anomDiebolt_Qrew EliteNative pie charts aggregate data across multiple records not across multiple fields in one record.
This might surprise many of you but this can be done using one formula field that contains some JavaScript and uses the OEH (On Error HTML) technique. The basic idea is to write some simple JavaScript that generates the chart and process that JavaScript so that it can be set as the value of an onerror attribute of HTML <img> element. I don't have time at the moment to create a demo but I put it on my to do list for the weekend. - _anomDiebolt_Qrew EliteSorry for the delay in posting this answer. I decided to not use OEH technique and instead used the standard IOL technique to implement this demo.
View [Record ID#] = 1
https://haversineconsulting.quickbase.com/db/bnn72zwa8?a=dr&rid=1
Add New Record
https://haversineconsulting.quickbase.com/db/bnn72zwa8?a=nwr
Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=653
Notes:
(1) Fee free to create a record with four numeric values for [North], [East], [South] and [West] representing sale prices or quantities. When the record is saved a Pie Chart will display,
(2) The Pie Chart is based on this Highchart demo
https://www.highcharts.com/demo/pie-basic
(3) QuickBase uses the requirejs module loader library to load its JavaScript libraries on demand. This is the essential code that you need to use to access Highcharts in your own customizationsrequire(["highcharts"], function(Highcharts) {
(4) You may notice slight differences in behavior (eg color scheme, sector highlighting) between QuickBase generated Pie Charts and this demo which was modeled after a Highcharts demo. All of these behaviors can be controlled to your liking using the appropriate Highchart configuration option.
// access Highcharts variable
});