Jump to content
Software FX Community

Re: Regarding some of you questions


User (Legacy)
 Share

Recommended Posts

Hello Tony, 

Thank you very much for your responses.

> 1) The update will hopefully come out within the next few days.

Thanks.

> 2) Regarding the Curve charts.

> In ChartFX 3.0, curve charts IGNORE the X-Axis values. These

> are supported in ChartFX98 (now Client/Server). That's why you get a

> different chart. To get the same chart remove the X-Values.

> X-Values must be strictly ascending:

Thanks.

> 3) We will need some sample code that reproduces the ZERO.CHD file.

I will try to get this though the odds are low. This was reported by a user

of our application.

He didn't remember anything unusual when he created the chart. He created

and saved that chart among many others and when he tried to load it some

time later he got the program error. Other charts created by him at that

time load ok.

As I wrote, our application saves chart files in its own format where

chartfx data is only a part of a bigger file. The beginning of this bigger

file contains data specific to our application, chartfx data are saved at

the end.

I have extracted zero.chd from the bigger file with a hex editor by finding

__CHARTFX4__ signature.

Below is the code from our application that loads and saves chartfx data

(pFile is a variable of MFC type CFile, it represents the 'bigger' file).

void CChartWnd::LoadChart(CFile* pFile, BOOL bTemplateOnly)

{

ASSERT_VALID(pFile);

ASSERT(pFile->m_hFile != CFile::hFileNull);

// don't load Printer Info

int nType = CHART_CFXFILE;

int nOldMask = m_pChartFX->FileMask;

int nNewMask = FMASK_ALL & ~(FMASK_PRINTERINFO);

// if V3.0 format, use special loading type

if (m_pTool != NULL && m_pTool->m_bV30Format)

nType = bTemplateOnly ? CHART_INTERNALTEMPLATE : CHART_INTERNALFILE;

// if template, don't load data points

if (bTemplateOnly)

nNewMask &= ~(FMASK_DATA|FMASK_SIZEDATA);

m_pChartFX->FileMask = CfxFileMask(nNewMask);

// load chart data/template

HRESULT hr = m_pChartFX->Import((CfxExport)nType, (LONG)pFile->m_hFile);

if (hr != S_OK)

AfxThrowOleException((SCODE)hr);

m_pChartFX->FileMask = CfxFileMask(nOldMask);

...

}

void CChartWnd::SaveChart(CFile* pFile, BOOL bTemplateOnly)

{

ASSERT_VALID(pFile);

ASSERT((HANDLE)pFile->m_hFile != INVALID_HANDLE_VALUE);

// don't save Printer Info

int nType = CHART_CFXFILE;

int nOldMask = m_pChartFX->FileMask;

int nNewMask = FMASK_ALL & ~(FMASK_PRINTERINFO);

// if template, don't save data points

if (bTemplateOnly)

nNewMask &= ~(FMASK_DATA|FMASK_SIZEDATA);

m_pChartFX->FileMask = CfxFileMask(nNewMask);

HRESULT hr = m_pChartFX->Export((CfxExport)nType, (LONG)pFile->m_hFile);

if (hr != S_OK)

AfxThrowOleException((SCODE)hr);

m_pChartFX->FileMask = CfxFileMask(nOldMask);

pFile->SeekToEnd(); // !!!

...

}

A note irrelevant to the zero.chd problem.

As you can see from the code above, I have to do SeekToEnd() to move the

file pointer to the end. Why Export method doesn't do it itself?

> 5) Regarding the pyramid labels overlapping. This can happen also with

> some pie or stacked charts as well. The label sizes will not always

> correspond to the layers or sections that are very small.

I understand. However Chart FX knows how to avoid overlapping on the Y and X

axes. For Pyramid charts, label are drawn vertically (similar to Y axis) so

it is very simple to check label heights and skip several labels (or make

other. Users would then increase the chart window size to allow all labels

be visible.

I didn't report this problem for Pie charts because I know that it is more

difficult to check for ovelapping labels on pies (though still possible).

Also, users have an option to separate pie slices and this allows them to

solve overlapping problems.

There is no such option for Pyramid charts.

> 6) Regarding the scatter type with no points. Thanks, suggestion taken.

Thanks.

> 7) As you probably already know, annotation objects do not resize with

> the chart unless attached as elastic. If the chart is size very small

they

> will overlap other parts, this is by design.

OK.

> 8) The annotation being split over two or more pages is known.

> 9) Resizing the legend box and data editor to negative width or height is

known.

Can we expect these two to be fixed in the next service pack?

Also, I seem to found another problem ( I will preserve my numbering).

=============================================================

8. Stacked 100% charts and Open/CloseData

Create a bar chart with 2 series.

Go to Chart FX Properties dialog, General tab, and select Stacked 100% type.

Click OK and the Y axis min and max are changed to 0 and 100.

Now do the following programmatically:

Check Stacked property of the chart, it is CHART_STACKED100

Update data points using OpenDataEx and CloseData with COD_VALUES

Check Stacked property again, it is now 0

and Y axis min and max has been changed from (0, 100) according to data

values

However, General tab still displays Stacked 100% and the chart window

display stacked bars

=============================================================

9. (this is not a problem but a question)

Chart FX 98 API Reference help contains a group of topics under UI Cross

Reference branch in Contents.

They describe the pages of the tabbed Chart FX Properties dialog, in

particular, Stripes, Font, Commands and Extensions pages.

How can I make these page appear of the Properties dialog? In our

application the Chart FX Properties dialog always contains just 4 pages,

General, Series, Axes and 3D regardless of the fact that charts have

annotation extension added and stripes defined.

Thanks in advance,

Serge

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.

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.

 Share

×
×
  • Create New...