Jump to content
Software FX Community

Conversion of Chart FX 3.0 chart


User (Legacy)

Recommended Posts

Hello!

We have a problem with opening one particular chart created with Chart FX

3.0 using Chart FX 5.1 (using the latest updates).

Please see the attached V3.CHD.

Normal look (as per 3.0) is shown on before.jpg shot.

But when opened with CFX 5.1 the chart looks completely wrong (after.jpg)

Any chance of getting this fixed?

Thanks in advance,

Serge S. Spiridonoff

Link to comment
Share on other sites

This is caused by a incorrect setting in the original chart that was not

used in Chart FX 3.0 and it is now supported in 5.1.

The setting is CL_VERTXLEG in the Legend Style. In Chart FX 3.0, vertical

labels were not supported in the X-Axis of a Gantt chart, now in 5.1 they

are, so although this flag was ignored (and caused no effect) in 3.0 it is

now doing the correct thing, turning the legend vertical.

So the solution is turn OFF the CL_VERTXLEG flag in the original chart, this

will cause NO effect in 3.0 but it will prevent the labels from being drawn

vertically by 5.1.

--

FP

Software FX

Link to comment
Share on other sites

Thank you for quick response. I will try your suggestion.

Is there any way I can detect (progrmmatically) this situation in a 5.1 code

when loading a 3.0 chart?

I prefer to 'fix' incorrect settings on load rather than asking users to

recreate the original chart.

However there are other problems with the converted chart.

1) The original chart is a Gantt chart but after conversion it is shown as a

Bar chart on the Chart FX Properties dialog, Series tab.

The same problem with the code, m_pChartFX->Gallery returns BAR instead of

GANTT.

2) I can't find a way to switch the converted chart to 'normal' Bars. I

tried changing the gallery to Pie and then back to Bar but is still shows as

Gantt. Why is this so?

Btw, other chart types also behave quite strange fom my point of view. For

example, if you change the chart to Line, the X-axis is still on the left

side while the Curve type moves the X-axis to the bottom.

3) The original chart has a vertical grid while the converted grid is

horizontal.

4) Wider bars are on the top of the original chart. But they are at the

bottom of the converted chart.

Serge

Link to comment
Share on other sites

Hello!

I can't reset LabelAngle to zero in any case.

For example, a Bar/Line chart may use 45 or 90 as LabelAngle to display long

x-axis labels.

I don't want to change the angle to 0 in this case and break user

customizations.

So I have an additional 'if' condition. I tried the following code but it

doesn't work...

if ((short)m_pChartFX->Gallery == GANTT && pXAxis->LabelAngle != 0)

pXAxis->LabelAngle = 0;

The problem is that m_pChartFX->Gallery returns BAR instead of GANTT.

It's the same problem as problem 1) from my previous post.

Is it a bug?

Also, do you have any comments regarding other problems 2) - 4) described in

my previous post?

Serge

Link to comment
Share on other sites

Since version 3.0 didn't have a gallery called GANTT, a horizontal bar chart

is translated as:

Gallery = BAR

((TypeMask & CT_HORZ) != 0) is TRUE

So your check can be:

if (((((DWORD)m_pChartFX->TypeMask) & CT_HORZ) != 0) &&

((short)m_pChartFX->Gallery == BAR) && pXAxis->LabelAngle != 0)

--

FP

Software FX

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...