[TeeChart Pro ActiveX tutorial]: other palette components of TeeChart

Download the latest version of TeeChart Pro ActiveX

Use additional TeeChart controls

TeeChart for.Net includes several additional controls that you can add to your project to enhance the runtime capabilities of your charging application.

Select and insert components

When you add the TeeChart of the. e component to the visual studio. Net toolbox, other controls are automatically added as well.

Associate components with TChart

You can use the Chart property to associate Commander and other non Chart components with TChart.

[C#]

commander1.Chart = tChart1;

[VB.Net]

Commander1.Chart = TChart1

ButtonColor

ButtonColor displays the Color editor, which you can associate with the Color attribute of a TeeChart object to modify its Color and transparency.

[C#]

private void Form1_Load(object sender, System.EventArgs e) { 
        tChart1.Aspect.View3D = false; 
        line1.FillSampleValues(20); 
        colorBand1.Axis = tChart1.Axes.Left; 
        colorBand1.Start = line1.YValues.Maximum * 0.8; 
        colorBand1.End = line1.YValues.Minimum * 1.2; 
        buttonPen1.Pen = colorBand1.Pen; 
} 

private void buttonColor1_Click(object sender, System.EventArgs e) { 
        colorBand1.Color = buttonColor1.Color; 
}

[VB.Net]

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 
        TChart1.Aspect.View3D = False 
        Line1.FillSampleValues(20) 
        ColorBand1.Axis = TChart1.Axes.Left 
        ColorBand1.Start = Line1.YValues.Maximum * 0.8 
        ColorBand1.End = Line1.YValues.Minimum * 1.2 
        ButtonPen1.Pen = ColorBand1.Pen 
End Sub 
         
Private Sub ButtonColor1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonColor1.Click 
        ColorBand1.Color = ButtonColor1.Color 
End Sub

ButtonPen

ButtonPen displays a border editor that you can associate with the Pen attribute of a TeeChart object to change its visibility, color, end, dash style, width, style, and transparency.

[C#]

private void Form1_Load(object sender, System.EventArgs e) { 
        tChart1.Aspect.View3D = false; 
        line1.FillSampleValues(20); 
        colorBand1.Axis = tChart1.Axes.Left; 
        colorBand1.Start = line1.YValues.Maximum * 0.8; 
        colorBand1.End = line1.YValues.Minimum * 1.2; 
        buttonPen1.Pen = colorBand1.Pen; 
} 
 
private void buttonColor1_Click(object sender, System.EventArgs e) { 
        colorBand1.Color = buttonColor1.Color; 
}

[VB.Net]

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 
        TChart1.Aspect.View3D = False 
        Line1.FillSampleValues(20) 
        ColorBand1.Axis = TChart1.Axes.Left 
        ColorBand1.Start = Line1.YValues.Maximum * 0.8 
        ColorBand1.End = Line1.YValues.Minimum * 1.2 
        ButtonPen1.Pen = ColorBand1.Pen 
End Sub 
         
Private Sub ButtonColor1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonColor1.Click 
        ColorBand1.Color = ButtonColor1.Color 
End Sub

TeeListBox

ChartListBox displays a list of Series in the chart at run time. ChartListBox can be used to provide users with limited customization and show / hide chart Series.

Commander

The Commander bar allows navigation and parameter change control (via the TeeChart editor) to be provided to the user at run time. Select the navigation button and press the left mouse button, drag the chart panel to move the chart.

editor

[C#]

private void Form1_Load(object sender, System.EventArgs e) { 
        editor1.Chart = tChart1; 
        line1.FillSampleValues(20); 
} 
 
private void button1_Click(object sender, System.EventArgs e) { 
        editor1.DefaultTab = Steema.TeeChart.Editors.ChartEditorTabs.Legend; 
        editor1.Title = "My Application Title"; 
        editor1.ShowModal(); 
}

[VB.Net]

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 
        Editor1.Chart = TChart1 
        Line1.FillSampleValues(20) 
End Sub 
         
Private Sub ButtonColor1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonColor1.Click 
        Editor1.DefaultTab = Steema.TeeChart.Editors.ChartEditorTabs.Legend 
        Editor1.Title = "My Application Title" 
        Editor1.ShowModal() 
End Sub

GalleryPanel

GalleryPanel displays the customizable TeeChart series gallery.



Tags: ASP.NET Attribute

Posted on Wed, 04 Dec 2019 03:16:38 -0500 by joesaddigh