Jump to content
Software FX Community

PIE Charts does not draw

User (Legacy)

Recommended Posts

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



Here are the steps

IChartFXPtr m_pChartFX;

BSTR bstrLic = GetLicenseKey();

IClassFactory2 *pFactory2;



if (SUCCEEDED(hr =


ry2,(LPVOID FAR *) &pFactory2)))


hr = pFactory2->CreateInstanceLic(NULL,NULL,IID_IUnknown,bstrLic,(LPVOID FAR

*) &pUnk);

if (SUCCEEDED(hr))


m_pChartFX = pUnk;





bRet = FALSE;





//draw the pie


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;


, 0);

Link to comment
Share on other sites

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


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.



Software FX

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...