Implement first working version.

Now this plugin can really draw charts. But some of planned features
are still not implemented yet.