CXTPChartSeries* pSeries1 = pCollection->Add(new CXTPChartSeries());
if (pSeries1)
{
pSeries1->SetName(_T("New York"));
CXTPChartSeriesPointCollection* pPoints = pSeries1->GetPoints();
if (pPoints)
{
CXTPChartSeriesPoint* pPoint = NULL;
pPoint = pPoints->Add(new CXTPChartSeriesPoint(1900, 7268));
pPoint = pPoints->Add(new CXTPChartSeriesPoint(1950, 14830));
pPoint = pPoints->Add(new CXTPChartSeriesPoint(1990, 17990));
pPoint = pPoints->Add(new CXTPChartSeriesPoint(2000, 18976));
pPoint = pPoints->Add(new CXTPChartSeriesPoint(2008, 19490));
}
pSeries1->SetStyle(new CXTPChartLineSeriesStyle());
}
CXTPChartSeries* pSeries2 = pCollection->Add(new CXTPChartSeries());
if (pSeries2)
{
pSeries2->SetName(_T("California"));
CXTPChartSeriesPointCollection* pPoints = pSeries2->GetPoints();
if (pPoints)
{
CXTPChartSeriesPoint* pPoint = NULL;
pPoint = pPoints->Add(new CXTPChartSeriesPoint(1900, 1485));
pPoint = pPoints->Add(new CXTPChartSeriesPoint(1950, 10586));
pPoint = pPoints->Add(new CXTPChartSeriesPoint(1990, 29760));
pPoint = pPoints->Add(new CXTPChartSeriesPoint(2000, 33871));
pPoint = pPoints->Add(new CXTPChartSeriesPoint(2008, 36756));
}
pSeries2->SetStyle(new CXTPChartLineSeriesStyle());
}
CXTPChartSeries* pSeries3 = pCollection->Add(new CXTPChartSeries());
if (pSeries3)
{
pSeries3->SetName(_T("Florida"));
CXTPChartSeriesPointCollection* pPoints = pSeries3->GetPoints();
if (pPoints)
{
CXTPChartSeriesPoint* pPoint = NULL;
pPoint = pPoints->Add(new CXTPChartSeriesPoint(1900, 528));
pPoint = pPoints->Add(new CXTPChartSeriesPoint(1950, 2771));
pPoint = pPoints->Add(new CXTPChartSeriesPoint(1990, 12937));
pPoint = pPoints->Add(new CXTPChartSeriesPoint(2000, 15982));
pPoint = pPoints->Add(new CXTPChartSeriesPoint(2008, 18328));
}
pSeries3->SetStyle(new CXTPChartLineSeriesStyle());
}
CXTPChartSeries* pSeries4 = pCollection->Add(new CXTPChartSeries());
if (pSeries4)
{
pSeries4->SetName(_T("Texas"));
CXTPChartSeriesPointCollection* pPoints = pSeries4->GetPoints();
if (pPoints)
{
CXTPChartSeriesPoint* pPoint = NULL;
pPoint = pPoints->Add(new CXTPChartSeriesPoint(1925, 3048));
pPoint = pPoints->Add(new CXTPChartSeriesPoint(1976, 7711));
pPoint = pPoints->Add(new CXTPChartSeriesPoint(1993, 16986));
pPoint = pPoints->Add(new CXTPChartSeriesPoint(2005, 20851));
pPoint = pPoints->Add(new CXTPChartSeriesPoint(2011, 24326));
}
pSeries4->SetStyle(new CXTPChartLineSeriesStyle());
}