User (Legacy) Posted November 11, 1999 Report Share Posted November 11, 1999 I am trying to creat an XY scatter chart with 5 points in VC6.0. If I declare at the view level that the graph is a scatter chart (ie...m_pChartFX->Gallery = SCATTER), then the graph works fine. The X Axis will go from 1 to 100 with each point going to its appropriate spot on the graph. However, if I try to declare the graph type at the series level (ie...m_pChartFX->Series->Item[0]->Gallery = SCATTER), and change notheing else, then all of the Y values print fine, but on the X axis, the points are labeled as 0,1,2,3,4. Is there something I am missing? Below is the code that I am using: m_pChartFX->Axis->Item[AXIS_X]->ResetScale(); m_pChartFX->Axis->Item[AXIS_Y]->ResetScale(); m_pChartFX->OpenDataEx((CfxCod) (COD_VALUES|COD_REMOVE), 1,5); m_pChartFX->OpenDataEx(COD_XVALUES, 1,5); m_pChartFX->Series->Item[0]->Gallery = SCATTER; m_pChartFX->Series->Item[0]->YAxis = AXIS_Y; m_pChartFX->Series->Item[0]->Yvalue[0] =57; m_pChartFX->Series->Item[0]->Yvalue[1] =90; m_pChartFX->Series->Item[0]->Yvalue[2] =12; m_pChartFX->Series->Item[0]->Yvalue[3] =21; m_pChartFX->Series->Item[0]->Yvalue[4] =89; m_pChartFX->Series->Item[0]->Xvalue[0] =10; m_pChartFX->Series->Item[0]->Xvalue[1] =45; m_pChartFX->Series->Item[0]->Xvalue[2] =32; m_pChartFX->Series->Item[0]->Xvalue[3] =67; m_pChartFX->Series->Item[0]->Xvalue[4] =21; m_pChartFX->CloseData(COD_VALUES); m_pChartFX->CloseData(COD_XVALUES); pAxis = m_pChartFX->Axis->Item[AXIS_X]; pAxis->Min = 0; pAxis->Max = 100; pAxis->STEP = 10; pAxis->MinorStep = 2; pAxis = m_pChartFX->Axis->Item[AXIS_Y]; pAxis->Min = 0; pAxis->Max = 100; pAxis->STEP = 10 Thanks, Lisa Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.