partial rewrite, including pChart

partial rewrite, including pChart

Signed-off-by: gautiermichelin <gm@ideesculture.com>