Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"BlazorApexCharts.Docs.Server": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "heatmap-charts#events",
"launchUrl": "tree-map-charts",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<DemoContainer>
<ApexChart TItem="Order"
Title="Order Net Value">

<ApexPointSeries TItem="Order"
Items="Orders"
Name="Gross Value"
ShowDataLabels="true"
SeriesType="SeriesType.Treemap"
XValue="@(e => e.Country)"
YAggregate="@(e => e.Sum(e => e.GrossValue))"
PointColor="e => GetPointColor(e)"
OrderByDescending="e=>e.Y" />

</ApexChart>
</DemoContainer>

@code {
private List<Order> Orders { get; set; } = SampleData.GetOrders();

public string GetPointColor(Order order)
{
return order.Country switch
{
"Brazil" => "#008FFB",
"Sweden" => "#00E396",
"Spain" => "#FEB019",
"France" => "#775DD0",
_ => "#546E7A",
};
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@page "/tree-map-charts"

<DocExamples Title="TreeMap Charts">

<CodeSnippet Title=Basic ClassName=@typeof(Basic).ToString()>
<Snippet>
<Basic />
</Snippet>
</CodeSnippet>



</DocExamples>
6 changes: 6 additions & 0 deletions docs/BlazorApexCharts.Docs/Shared/MainNavigation.razor
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@
</MenuItemIcon>
</NavbarMenuItem>

<NavbarMenuItem Href="tree-map-charts" Text="TreeMap">
<MenuItemIcon>
<Icon class="icon" IconType="@Icons.Chart_infographic" />
</MenuItemIcon>
</NavbarMenuItem>

<NavbarMenuItem Href="rangearea-charts" Text="RangeArea">
<MenuItemIcon>
<Icon class="icon" IconType="@Icons.Chart_area_line" />
Expand Down