Jump to content
Software FX Community

Re: Regarding some of you questions

User (Legacy)

Recommended Posts

Hello Tony, 

Thank you very much for your responses.

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


> 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:


> 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(pFile->m_hFile != CFile::hFileNull);

// don't load Printer Info

int nType = CHART_CFXFILE;

int nOldMask = m_pChartFX->FileMask;


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

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


// if template, don't load data points

if (bTemplateOnly)


m_pChartFX->FileMask = CfxFileMask(nNewMask);

// load chart data/template

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

if (hr != S_OK)


m_pChartFX->FileMask = CfxFileMask(nOldMask);



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




// don't save Printer Info

int nType = CHART_CFXFILE;

int nOldMask = m_pChartFX->FileMask;


// if template, don't save data points

if (bTemplateOnly)


m_pChartFX->FileMask = CfxFileMask(nNewMask);

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

if (hr != S_OK)


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.


> 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


> will overlap other parts, this is by design.


> 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


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


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,


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...