|
<SfChart Title="Olympic Medals" Width="650">
<ChartPrimaryXAxis ValueType="Syncfusion.Blazor.Charts.ValueType.Category" LabelRotation="90">
<ChartAxisLabelBorder Type="BorderType.Rectangle"></ChartAxisLabelBorder>
<ChartMultiLevelLabels>
<ChartMultiLevelLabel>
<ChartCategories>
<MultiLevelLabelsPrimaryXAxisCategories>
<ChartCategory Start="-0.5" End="2.5" Text="In Season">
</ChartCategory>
<ChartCategory Start="2.5" End="5.5" Text="Out of Season">
</ChartCategory>
</MultiLevelLabelsPrimaryXAxisCategories>
</ChartCategories>
<ChartMultilevelLabelFont Color="Red"></ChartMultilevelLabelFont>
<ChartMultilevelLabelBorder Type="BorderType.Rectangle">
</ChartMultilevelLabelBorder>
</ChartMultiLevelLabel>
</ChartMultiLevelLabels>
</ChartPrimaryXAxis>
<ChartSeriesCollection>
<ChartSeries DataSource="@FruitDetails" XName="Fruit" YName="ItemCount" Type="ChartSeriesType.Column">
</ChartSeries>
</ChartSeriesCollection>
</SfChart>
@code{
public int start = 0, end = 30;
public class Produce
{
public string Fruit;
public string Status;
public double ItemCount;
}
public List<Produce> FruitDetails = new List<Produce>
{
new Produce { Fruit= "Grapes ", ItemCount= 28, Status = "In Season" },
new Produce { Fruit= "Apple ", ItemCount= 50, Status = "In Season" },
new Produce { Fruit= "Pears ", ItemCount= 39, Status = "In Season" },
new Produce { Fruit= "Grapes", ItemCount= 23, Status = "Out of Season" },
new Produce { Fruit= "Apple", ItemCount= 33, Status = "Out of Season" },
new Produce { Fruit= "Pears", ItemCount= 10, Status = "Out of Season" },
};
} |