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);
}