User (Legacy) Posted December 13, 2006 Report Share Posted December 13, 2006 Hi, I try to use ListDataProvider on my Chart in Visual C++ 2005. ( I useChartFXClientServer62 ) I add in stdafx.h these 2 lines : #import <ChartFX.ClientServer.data.dll> rename_namespace("Cfx62Data") #import <ChartFX.ClientServer.core.dll> rename_namespace("Cfx62") rename("min","minX") rename("max","maxX") exclude("_CollectionBase","_Component","CollectionBase","Component") Here is the code that cause problem : Cfx62Data::_ListDataProviderPtr m_listDataProviderPtr = Cfx62Data::_ListDataProviderPtr( __uuidof(Cfx62Data::ListDataProvider) ); int nTest1[3] = { 1,2,3 }; int nTest2[3] = { 4,5,6 }; CString nTest3[3]; nTest3[0] = CString("a"); nTest3[1] = CString("b"); nTest3[2] = CString("c"); HRESULT result1 = m_listDataProviderPtr->AddCollection( (VARIANT*)nTest1 ); HRESULT result2 = m_listDataProviderPtr->AddCollection( (VARIANT*)nTest2 ); HRESULT result3 = m_listDataProviderPtr->AddCollection( (VARIANT*)nTest3 ); m_chartPtr->DataSourceSettings->DataType->Item[0] = Cfx62::DataType_Value; m_chartPtr->DataSourceSettings->DataType->Item[1] = Cfx62::DataType_Value; m_chartPtr->DataSourceSettings->DataType->Item[2] = Cfx62::DataType_XValue; m_chartPtr->DataSource = m_listDataProviderPtr->Get_Ptr(); All lines seem to work fine but the result is an empty chart. What is the problem? Thanks Marc Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.