WebChart control.

For a list of all members of this type, see WebChart Members


System.Object
   System.Web.UI.Control
      System.Web.UI.WebControls.WebControl
         System.Web.UI.WebControls.BaseDataBoundControl
            System.Web.UI.WebControls.DataBoundControl
[Serializable]
public class WebChart : DataBoundControl , IComponent, IDisposable
, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor
, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor
, INamingContainer, IPostBackEventHandler, IPostBackDataHandler, IChart
, ISerializable

Remarks


WebChart is the central component in TeeChart library for Web Forms and is the container for all other TeeChart objects. The diagram below indicates the main TeeChart objects that can be accessed from the WebChart class:



WebChart objects can only be added to Web Forms at design-time by dragging the a WebChart component across a Web Form, although series can be added at both design and run-time; at run-time we could use:

[C#] 
private void Page_Load(object sender, System.EventArgs e)
{    
     if(!((System.Web.UI.Page)sender).IsPostBack) {
        Steema.TeeChart.Chart tChart1 = WebChart1.Chart;
        Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1);
        bar1.FillSampleValues(20);
    }
}

[VB.Net]
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If Not CType(sender, System.Web.UI.Page).IsPostBack Then
        Dim TChart1 As Steema.TeeChart.Chart = WebChart1.Chart
        Dim Bar1 As New Steema.TeeChart.Styles.Bar(TChart1)
        Bar1.FillSampleValues(20)
    End If
End Sub
or...

[C#] 
private void Page_Load(object sender, System.EventArgs e)
{    
     if(!((System.Web.UI.Page)sender).IsPostBack) {
        Steema.TeeChart.Chart tChart1 = WebChart1.Chart;
        tChart1.Series.Add(new Steema.TeeChart.Styles.Pie());
        tChart1.Series[0].FillSampleValues(20);    
    }
}

[VB.Net]
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If Not CType(sender, System.Web.UI.Page).IsPostBack Then
        Dim TChart1 As Steema.TeeChart.Chart = WebChart1.Chart
        TChart1.Series.Add(New Steema.TeeChart.Styles.Pie())
        TChart1.Series(0).FillSampleValues(20)
    End If
End Sub

Any number of WebChart objects can co-exist on a single Web Form. To use TeeChart within a Windows Form environment please use the Steema.TeeChart.TChart class.

For an indepth look at how to create Charts with TeeChart see the TeeChart Tutorials.

Requirements

Namespace: Steema.TeeChart.Web Namespace

Assembly: TeeChart.dll

See Also

WebChart members | Steema.TeeChart.Web Namespace