BCGSoft > Products > Product feature tour

Product feature tour

Context | First | Prev | Next | Last
Fully implemented BCGControlBar Pro (MFC)
Fully implemented BCGSuite (MFC)
Not available BCGControlBar (Microsoft .NET)

Chart Data Binding

You can easily add a chart data from external data source such as ODBC or ADO.

You can add chart data points from the database table using CBCGPChartVisualObject::BindDataTable and CBCGPChartVisualObject::BindDataSQL methods.

Sample code:
// Create ODBC data provider (MS Access file "Database.mdb"):
CChartODBCDataProvider provider;
if (provider.OpenMSAccessFile(_T("Database.mdb")))
    // Add data located in table "Database Table Name".
    // Each column will be presented as new series:
    CBCGPChartVisualObject* pChart1;

    pChart1->BindDataTable(provider, _T("Database Table Name"));

    // Add data located in table "Table2".
    // Series A, B, C with conditon:
    CBCGPChartVisualObject* pChart2;
    pChart2->BindDataSQL(provider, _T("SELECT A, B, C from Table2 where A < 10"));
Prev  Next