Jump to content
Software FX Community

PIE Charts does not draw


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

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);

Link to post
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

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

Link to post
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.

Guest
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.

Loading...
×
×
  • Create New...