Percentage Charts

Hi everyone

We recently had to create bar charts for a client, showing number of jobs in each area. They also wanted to show the % of jobs in each area. Of course, it’s a straightforward calculation if you know the total number of jobs.

​But the chart also had a Refined Search. Once you refined the search, the total number of jobs changed, and the % calculation didn’t work any more.

​We managed to force a solution using {sc_where_current}​ to get the current WHERE clause and then looking up the record count from the database. It’s a bit of a messy and complex solution for something which could be simple, and it also is rather slow.

​Has anyone got a better way to do this? And could percentage please be added as an option in Scriptcase charting? It could just be a tick box. If you tick it, then each data point gets a percentage instead of a value.

Thanks and regards to all

Jeff