Page 1 of 1

Some questions about using Legend.

Posted: Tue Apr 18, 2006 10:47 am
by 9530613
Hello Support Team,

Some questions/improvements offer:

1. I need N-Range palette. Now it is possible to set 3 levels: StartColor, MidColor, EndColor (IColorGridSeries) and me it is necessary 6 levels. How it to make ?

2. I need legend smooth. How it to make ?

3. Improvement: it would be convenient if the legend was leveled on a picture, from bottom border to top border. Now it is necessary to do it in manual.

Now all.

Best Regards, Rustam.

Posted: Tue Apr 18, 2006 11:12 am
by narcis
Hi Rustam,

Please find below the answers to your questions:

1. This can already be done using something like this:

Code: Select all

Private Sub Form_Load()

    Dim x, y, z As Integer
    
    With TChart1.Series(0).asColorGrid
        .ClearPalette
        .UseColorRange = False
        .UsePalette = True
        
        .AddPalette 100, vbGreen
        .AddPalette 200, vbWhite
        .AddPalette 300, vbYellow
        .AddPalette 400, vbBlue
        .AddPalette 500, vbBlack
        .AddPalette 600, vbPurple
        .AddPalette 700, vbRed
        .AddPalette 800, vbRed
        .AddPalette 900, vbRed
        .AddPalette 1000, vbRed
        
        y = 0
        For z = 0 To 60
            For x = 0 To 85
                .AddXYZ x, y, z, "", clTeeColor
                y = (y + 1) Mod 1001
            Next x
        Next z
    End With
End Sub
2. What you would like to get, an anti-aliased legend?

3. I don't understand what are you meaning. Could you please be more specific and if possible send us an image of what would you like to get?

You can post your files at news://www.steema.net/steema.public.attachments newsgroup.

Thanks in advance.

Posted: Tue Apr 18, 2006 11:26 am
by 9530613
narcis wrote:
1. This can already be done using something like this:
It not that:

1. In this case no smoothing a palette

2. In AddPalette first parameter is Value and I need in position color in range of colors. For example:

palette[0]=0xff0000;
palette[1]=0xffff00;
palette[2]=0x00ff00;
palette[3]=0x00ffff;
palette[4]=0x0000ff;
palette[5]=0xff00ff;

Rustam.