Page 1 of 1

Rapid increase in time taken to update chart with shapes

Posted: Thu Jan 08, 2009 2:41 pm
by 15050891
Dear Sir/Madam

I am using Visual Studio 2008 the C++ component in developing my application. The application calls for the addition of a large amount of shapes. I have witnessed a non linear increase in the time taken to draw shapes on the chart.

For 500 shapes approx 1 second.
For 1000 shapes approx 10 seconds.

I would expect it to take 2 seconds. I imagine that I might be calling functions incorrectly.

The code I am using is as follows:

mChart.AddSeries(scShape); // Add a shape
seriesCount = m_Chart.GetSeriesCount() - 1; // Obtain the number of shape entries


// Place the shapes at specific coordinates
mChart.Series(seriesCount).GetAsShape().SetX0(symbCoords.x0 - m_scaleFreq);
mChart.Series(seriesCount).GetAsShape().SetX1(symbCoords.x1 + m_scaleFreq);
mChart.Series(seriesCount).GetAsShape().SetY0(symbCoords.y0 - m_scaleTime);
mChart.Series(seriesCount).GetAsShape().SetY1(symbCoords.y1 + m_scaleTime);

// Set shape
mChart.Series(seriesCount).GetAsShape().SetStyle(chasTriangle);

// Set color
mChart.Series(seriesCount).SetColor(m_colorAed);

I would greatly appreciate any advice in solving this problem.

Regards
Jacques

Posted: Thu Jan 08, 2009 3:25 pm
by narcis
Hi Jacques,

Could you please send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.

Posted: Wed Jan 14, 2009 11:51 am
by narcis