
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 the electricity price and the daily hours of use of six appliances. The calculator shows:
- Yearly and monthly cost — of all the appliances together.
- Biggest consumer — the appliance that costs the most.
- Ranking chart — horizontal bars sorted from the most to the least expensive, followed by the same figures in a table.
How it’s built
The PHP Code computes the cost of each appliance, sorts the list and splits it into two arrays: $names and $costs. Because the arrays are sorted in PHP, the chart is always a ranking.
The chart ranking is of type Horizontal bars, which is the best choice for long category names. The option Also show the data table is enabled, so the exact figures appear under the chart.
It also has a custom series colour that matches the design of the calculator.
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 · Easy