Rapid increase in time taken to update chart with shapes
Posted: Thu Jan 08, 2009 2:41 pm
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
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