wrobstory/vincent — pull request #87 by lxyu (2013-12-17 09:18:34+00:00)
Title: Refine charts

Hi, this pr changed quite a bit codes.

The main changes are:

1. for each type of chart, build it from scratch based on `Chart` class.
2. merged `StackedBar` -> `Bar`, merged `StackedArea` -> `Area`.
3. tune tests for rewrites in charts and make them fit for pep8 coding style.

About why:

1. The previous codes, class inherit each other, it don't reduce code, but actually makes it very difficult to figure out what's exactly in a chart.

For example, `GroupedBar` -> `StackedBar` -> `StackedArea` -> `Area` -> `Line` -> `Bar` -> `Chart`, it's really a long inherit chain. With attributes deleted and added in each chain, it almost impossible to figure out what is inside GroupedBar.

So I just reconstruct each type of chart directly from `Chart` base class, with every attributes explicitly declared, it's now more clear on what inside each chart. And make it more easier for future customize.

2. The stacked bar/area can actually be the same with bar/area, so I just merge them together to simplify the API. While I keep them with `StackedBar = Bar` for backward compatibility.

Currently, there are only 6 kinds of chart: `Line`, `Scatter`, `Bar`, `Area`, `Pie`, `Map`，which I think is more simpler.