anychart.onDocumentReady(function () {
data = anychart.data.set([
["Department Stores", 637166, 737166, 813000, 719242, 791736, 837164, 918364, 819363, 864213],
["Discount Stores", 721630, 537166, 128013, 471946, 385638, 764426, 237561, 628452 ,721645],
["Men's/Women's Specialty Stores", 148662, 188662, 194912, 573173, 384617, 481627, 615373, 274618 ,471846],
["Juvenile Specialty Stores", 78662, 178662, 612037, 589275, 128614, 201385, 171284, 317394 ,172846],
["All other outlets", 90000, 89000, 375913, 183613, 100847, 92714, 192483, 137184 ,99128]
var Sales2003 = data.mapAs({x: 0, value: 1});
var Sales2004 = data.mapAs({x: 0, value: 2});
var Sales2005 = data.mapAs({x: 0, value: 3});
chart = anychart.cartesian();
chart.defaultSeriesType("column");
chart.addSeries(Sales2003, Sales2004, Sales2005);
chart.title("Add/Remove Series sample");
var xAxis = chart.xAxis();
xAxis.title("Retail Channel");
var yAxis = chart.yAxis();
chart.container("container");
if (chart.getSeriesCount()<9)
chart.addSeries(data.mapAs({x: 0, value: [chart.getSeriesCount()+1]}));
if (chart.getSeriesCount()>0)
chart.removeSeriesAt(chart.getSeriesCount()-1);