Skip to content
Moonsoft Software SolutionsDEMO
SITE

Homemoonsoft.es ↗

Demo SiteCalc Builder

18 of 21

Your electricity tariff
You will find it on your bill.
Average hours of use per day
Yearly daily average.

CalcBuilder example · Charts · Easy

Appliance Energy Cost Ranking

December 1, 2026

Appliance Energy Cost Ranking shown on the live frontend, with a calculated result.

Live result on the frontend

Yearly electricity cost per appliance, ranked in a horizontal bar chart with its data table.

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.

Appliance Energy Cost Ranking - charts on the frontend

The charts as your visitors see them.

Appliance Energy Cost Ranking - Charts screen

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

Appliance Energy Cost Ranking - Exit Layout

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

Appliance Energy Cost Ranking - PHP Code screen

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

Appliance Energy Cost Ranking - input form on the frontend

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.