Chart.Height Property

Gets or sets the height, in pixels, of the chart image.

Namespace:  System.Web.Helpers
Assembly:  System.Web.Helpers (in System.Web.Helpers.dll)

public int Height { get; }

Property Value

Type: System.Int32
The chart height.

The following example shows how to use the Height property to create a chart image of a specific height.

    var basicChart = new Chart(width: 600, height: 400) 
        .AddTitle("Chart Title") 
            name: "Employee", 
            xValue: new[] {  "Peter", "Andrew", "Julie", "Mary", "Dave" }, 
            yValues: new[] { "2", "6", "4", "5", "3" }) 

  • Medium trust for the immediate caller. This member can be used by partially trusted code.