Page 1 of 1

TextExport formatting problem

Posted: Fri Sep 07, 2007 1:01 pm
by 9643156
Hello,

using TeeChart v7 (7.0.1.4) and C++, I am experiencing a problem with the output text when more than one series are available.

If any of the series have more data points than the first series, the columns in the output text are shifted left, so the data seems mangled.

Here is an example:

Code: Select all

X1   Y1    X2  Y2
1     10    100     1000
2     20    200     2000
3     30    300     3000
400 4000                       <-- These value are placed incorrectly
500 5000
I tried setting the Text Delimiter to ";" to see if that would fix the problem, but unfortunately to no avail.

My code for extracting the text goes basically like this:

Code: Select all

CTextExport tex = m_CTChart.GetExport().GetAsText();
tex.SetIncludeHeader( TRUE );
tex.SetIncludeLabels( TRUE );	// Include labels in the export text.
tex.SetTextDelimiter( ";" );

// Get data as text from the TChart.
CString strTxt = tex.AsString();
Is there a newer version that fixes this? Or maybe a workaround?

Posted: Fri Sep 07, 2007 1:52 pm
by narcis
Hi Steffen,

Yes, this is a bug (TV52012444) which I have added to our defect list to be fixed for next releases.

In the meantime, the only workaround I can think of is checking which series has more values and change series order accordingly so that the series with more values is the first one exported, for example:

Code: Select all

	long series1;	
	series1 = m_Chart1.AddSeries(scLine) ;
	m_Chart1.Series(series1).FillSampleValues(5);

	long series2;
	series2 = m_Chart1.AddSeries(scLine) ;
	m_Chart1.Series(series2).FillSampleValues(10);

	if (m_Chart1.Series(series1).GetCount() < m_Chart1.Series(series2).GetCount())
	{
		m_Chart1.ExchangeSeries(series1,series2);
	}

Posted: Mon Sep 10, 2007 5:12 am
by 9643156
Hi NarcĂ­s,

thank you for your quick response.

Regarding future releases: Will there be any more version 7.x.x releases, or do we need to upgrade to version 8 to get the bugfix for this?

Posted: Mon Sep 10, 2007 9:46 am
by narcis
Hi Steffen,

You're welcome. There's no plan for more v7 releases unless showstopping issues are detected and urgent fixes are necessary.

Posted: Wed Sep 19, 2007 10:48 am
by narcis
Hi Steffen,

This has already been fixed in v8. The fix will be included in the next maintenance release.