Chart based on calculated data


I have been working on this project for a while and need some advice. I have created a retirement calculator that calculates compound interest on superannuation (pension) fund over time. Once you put in the details it shows a year on year summary of growth.

Try it here: - you don’t need to put in email or name to test it out.

OK, here is where I am stuck. I want to display these calculated results on a chart. I have tried Maxicharts, GFchart and playing with wpdatatables at the moment and can’t seem to get any of them to display the chart - they all seem to work based on user responses rather than calculated fields.

2 questions: anyone now of a way to acheive this based on the form I have created or 2: is there a way of creating a form that instead of calculates the fields, add extra rows to create a more tradtiaional datatable?


I am guessing there is no answer to this?

Hi Jonathan,

I’m a user of GF and a PHP dev. My experience with JS is limited, so I cannot attest to your options there. I did try out your current app, and it’s impressive what you have achieved without any backend custom coding, imho.

From my own limited perspective, it seems your goal could be handily accomplished with some custom PHP functions written to your requirements. This is how I would tackle it should the task be assigned on me.

You also might consider generating a PDF for the user, if that suits your design. I recently created an app which took user’s input, and constructed a PDF based on that input processed with a set of rules. A PDF is handy both as a digital copy and printable for those that like hard copies.

Sorry I can’t be more helpful than that. Do feel free to DM me should you decide to enlist some outside help.


Thanks James - the purpose of the exercise was to see how far I can push the existing plugins as they are so that other financial clients can replicate this and other calculators / functions rather than having to pay a subscription fee for bank sponsored systems.

As an update I have managed to get a chart to reflect the growth over time and a chart to show how long your money will last after you retire which will show on the confirmation page. Still a few bugs to work out.

I think I have also managed to get a pdf to send to the client with the chart and datatable on it. Some PHP customisation may be needed to display the pdf correctly.

Thanks again

1 Like

Hi Jonathan!

Nice job! Congratulations for this amazing form that you’ve created. Maybe you’ve tried this option… but, how about using Gravity View and GFCharts for results visualisation?

I hope you find a great solution ;).

1 Like

Thanks Flavia. I tried Gravity View and GFCharts. Unfortunately it was restricted to the charts about user feedback.

Two more small issues to solve then I’ll post the final version on here.

1 Like

Ok, for those who were monitoring this string, this is where I am up to:

The issues were getting Gravity Forms to only show the last entry so that the notification showed the correct summary and growth chart. While I was determined to not do any custom PHP work to make it happen I found that I had to do a quick extra coding to get Gravity Forms to use the latest entry for the charts and summary and then delete the entry so next time there was only one.

The code was added to the theme functions.php file and I found it in the GF docs:

I did try a few plugins but they had some unexpected results.

Note: I am using wpdatatables to create the charts as it was the only one I could find that would do it properly. However, before you drop in the above code and delete all old entries, get your chart right first. As soon as you delete everything and go and try to configure the charts or tables it throws up fatal errors as there are no entries to build from. So if you try out my form, you will still see that two charts show up at the end (I am keeping one old entry in there in case I need to make chart or table changes) until I hand it over and delete the old entry.

Gravity pdf looks to be working too - just need to sort out the look of the document.


Nice job Jonathan !

And thanks for sharing in all your trials and solutions :slight_smile:


1 Like