Revert "simplified chart drawing"

This reverts commit cf479573dbf5cfe0da27869d5370ca89eb38eeb0.
 added jquery