Back to Devexpress

DxChartBase.Height Property

blazor-devexpress-dot-blazor-dot-dxchartbase-45353a24.md

latest2.2 KB
Original Source

DxChartBase.Height Property

Specifies the chart component’s absolute or relative height.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public string Height { get; set; }

Property Value

TypeDescription
String

The chart’s height in CSS units.

|

Remarks

The base height of a chart area is 300 pixels. If the chart displays additional elements (for example, a legend or title), the component grows by the height of these elements.

Use the Width and Height properties to specify a custom size for the chart component. The following code snippet sets the chart component size to 75% of the parent component (<div>).

razor
<div class="container">
    <DxPieChart Data="@SalesInfo" Width="75%" Height="75%"> @* Width = 699px; Height = 330px *@
        @* ... *@
    </DxPieChart>
</div>
css
.container {
    width: 932px; 
    height: 440px;
}

You can also specify the Height property value in absolute units, for example, pixels.

razor
<DxPieChart Data="@SalesInfo" Height="400px">
  @* ... *@
</DxPieChart>

If you set this property to a floating-point value, the chart uses the AwayFromZero operation to convert this value to the integer number that is treated as a value in pixels.

See Also

DxChartBase Class

DxChartBase Members

DevExpress.Blazor Namespace