
Live result on the frontend
Video walkthrough
How the example is built, in under two minutes. English audio and subtitles.
What it calculates
A visitor enters a monthly income and five spending categories. The calculator shows:
- Money left each month — income minus all spending.
- Savings rate — the share of income that is not spent.
- Doughnut chart — one slice per category, plus what is left to save.
How it’s built
The PHP Code builds two arrays: $labels with the category names and $amounts with the values.
On the Charts screen there is one chart called budget, of type Doughnut, with PHP variables as data source, labels as labels and one series whose values are amounts.
In the Exit Layout, the tag ##chart_budget## marks the place where the chart is drawn. Nothing else is needed: no JavaScript and no chart library to install.
Charts require the Calc Builder version that includes the Charts screen.

The charts as your visitors see them.

The Charts screen: type, data source, labels and data series of each chart.

The Exit Layout: each ##chart_name## tag marks where a chart is drawn.

The PHP Code, which prepares the figures and the arrays used by the charts.

The input form, styled with the Form Layout.
Want this exact example on your own site?
Download the file above, then in your Joomla admin open Components › CalcBuilder › Import and upload it — it’s the same file you’d get from that component’s own Export button, charts included.

CalcBuilder example · Charts · Starter