Animated Zoom Does Not Work
Posted: Tue Jun 07, 2005 9:59 pm
I am using TeeChart .NET version 1.1.1879.21176 and animated zoom does not work. I also had an issue with points in a bubble series showing up with random color, but I found a fix in another posting on this forum (but the odd behavior still seems like a bug to me -- I would expect it to work or not work, whereas partial random colors is weird behavior).
Here is the code:
Here is the code:
Code: Select all
private void Form1_Load(object sender, System.EventArgs e)
{
// "Animated Zoom" BUG: *Animated* zoom does not work (zoom works, but it is not animated).
tChart1.Zoom.Allow = true;
tChart1.Zoom.Animated = true;
tChart1.Zoom.AnimatedSteps = 20;
// "Easter Egg" BUG: All bubble points should be "BurlyWood" color, but some points aren't.
const int seriesCount = 1;
const int pointsPerSeries = 12;
const int rowsPerSeries = 2;
const int pointsPerRow = pointsPerSeries/rowsPerSeries;
for (int iSeries = 0; iSeries < seriesCount; iSeries++)
{
Bubble series = new Bubble();
series.Squared = false;
// This will fix the bug: series.XValues.Order = ValueListOrder.None;
for (int iPoint = 0; iPoint < pointsPerSeries; iPoint++)
{
series.Add(iPoint % pointsPerRow, iSeries * rowsPerSeries + iPoint / pointsPerRow, 0.45f, Color.BurlyWood);
}
tChart1.Series.Add(series);
}
UpdateMargin();
}
protected virtual void UpdateMargin()
{
double min = 0, max = 0;
tChart1.Axes.Bottom.CalcMinMax(ref min, ref max);
min--;
max++;
tChart1.Axes.Bottom.SetMinMax(min, max);
tChart1.Axes.Left.CalcMinMax(ref min, ref max);
min -= 0.5;
max += 0.5;
tChart1.Axes.Left.SetMinMax(min, max);
}