Refine average/peak algorithm and chart rendering

1. Refine average calculation algorithm
2. Use reportlab method to render line chart

Signed-off-by: Chun Chen <chun.chen@archermind.com>