User (Legacy) Posted March 21, 2005 Report Share Posted March 21, 2005 I am using the ChartFX Client Server version of ChartFX. I have a problem, whenever the pie chart has only one slice and it is 100% or in other words the whole pie should be one color. This is a multiseries one and there are multiple pies and if there is more than one pie then the same thing happens when the pie is 100% I do not see the pie drawn. This happens when I do Paint passing a device context. The pie chart appears fine when I draw it on the OCX instead. //steps to draw the pie are same in both instances Thanks Indhu Here are the steps IChartFXPtr m_pChartFX; BSTR bstrLic = GetLicenseKey(); IClassFactory2 *pFactory2; LPUNKNOWN pUnk; HRESULT hr; if (SUCCEEDED(hr = CoGetClassObject(__uuidof(ChartFX),CLSCTX_INPROC_SERVER,NULL,IID_IClassFacto ry2,(LPVOID FAR *) &pFactory2))) { hr = pFactory2->CreateInstanceLic(NULL,NULL,IID_IUnknown,bstrLic,(LPVOID FAR *) &pUnk); if (SUCCEEDED(hr)) { m_pChartFX = pUnk; pUnk->Release(); } else { bRet = FALSE; } pFactory2->Release(); } SysFreeString(bstrLic); //draw the pie //Paint int width = GetDeviceCaps((HDC)hdc,HORZRES); int height = GetDeviceCaps((HDC)hdc,VERTRES); RECT rect; rect.left = width / 20 ; rect.top = height / 20 ; rect.right = width - rect.left; rect.bottom = height - rect.top; m_pChartFX->Paint(hdc,rect.left,rect.top,rect.right,rect.bottom,CPAINT_PRINT , 0); Quote Link to comment Share on other sites More sharing options...
Software FX Posted March 22, 2005 Report Share Posted March 22, 2005 We are unable to reproduce this behavior. I can create a Pie chart with just one value and it shows up just fine. Also a Pie chart with several values but all of tem Zero except for one shows correctly. The only case in which I get no Pie at all if that all values are zero. This is by design. Please turn on the data editor in the chart to verify your data. Attach a screenshot if you still have a problem. -- FP Software FX Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.