DxSparkline.ValueFieldName Property
Specifies the data source field that populates values for series points.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
[DefaultValue("val")]
[Parameter]
public string ValueFieldName { get; set; }
Property Value
Type | Default | Description |
---|---|---|
String | "val" | The name of the data source field. |
Remarks
Use the Data property to bind the Sparkline component to an IEnumerable<T> data source. Specify ArgumentFieldName and ValueFieldName
properties to obtain arguments and values for series points from data source fields.
<DxSparkline Data="@DataSource"
Type="SparklineType.Bar"
ArgumentFieldName="Month"
ValueFieldName="VisitorCount"
Height="50px"
Width="200px" />
@code {
IEnumerable<SparklineDataPoint> DataSource = Enumerable.Empty<SparklineDataPoint>();
protected override void OnInitialized() {
DataSource = GenerateData();
}
}
See Also