Page 1 of 1

Set Colorgrid chart depth axis minimun & maximun values

Posted: Thu Mar 15, 2007 12:28 pm
by 9641347
Can I Set minimum & maximun values in depth axis of a colorgrid chart?

An example: fill a chart with 50 random values, data values running between [-0.82, 1.28].

Why autoescale limits for depth axis are automatically set [1, 51] (number of points)?

If I change that values to [1, 1.25] it has no effects, chart displays the original 50 points.

I want to draw points between [1, 1.25], Is that possible?

Thanks in advance

Posted: Fri Mar 16, 2007 11:13 am
by 9348258
Hi Sinais

You can change the range of Detph Axes with "SetMinMax" method.

Which TeeChart version are you using? We have done a simple example, as below code, and ColorGrid has changed.

Code: Select all

private void Form1_Load(object sender, EventArgs e)
        {
            Random rnd = new Random();
            for (int i = 0; i < 10; i++)
                for (int j = 0; j < 5; j++)
                {
                    //range [-0.82,1.28]
                    double d = rnd.NextDouble() * (1.28 + 0.82) - 0.82;
                    colorGrid1.Add(i, d, j);
                    listBox1.Items.Add(d.ToString());
                }
            tChart1.Axes.Depth.SetMinMax(0,2);
            tChart1.Axes.DepthTop.SetMinMax(0,2);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            colorGrid1.Clear();
            Random rnd = new Random();
            listBox1.Items.Clear();
            for (int i = 0; i < 10; i++)
                for (int j = 0; j < 5; j++)
                {
                    //range [1,1.25]
                    double d = rnd.NextDouble() * (1.25 - 1) + 1;
                    colorGrid1.Add(i, d, j);
                    listBox1.Items.Add(d.ToString());
                }
        }
Could you please tell us What do you want to do exactly? Or Could you send us a simple example project we can run "as-is" to reproduce the issue here?

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