Friday, May 30, 2008

CDR Report Monthly Traffic

The CDR report is fantastic tool for getting call statistics on for your Asterisk.
I was configuring that for my Asterisk. I have installed the version asterisk-stat-v2_0_1 on my machine.

While testing I found the MONTHLY TRAFFIC, Pie chart inconsistence.
It is showing the proper values in the PIE CHART but the colors are not coming properly as it should.
Well, the values are coming properly, March 2008 is having 390 mins and pie hart shows it as 97%, but the color of that block of pie doesn't match, as shown below.

After much debugging I found the solution for that and it is to revert the array which feeds the data to the graph.
The pie graph is getting generated in graph_pie.php
In this file the $data is used to generate the graph (i.e it is passed in the class PieGraph).

So in order to get proper colors according to the you just need to revert the array before it get passed to the class ;)

Well, this may be probably a bug or overlooked while designing.
If you found any bugs and want to have solutions of other bugs I have found and fixed, just drop me a mail.
You will have solution in mail...

No comments: