<div>
<EjsTreeMap TValue="CarSalesDetails" WeightValuePath="Sales"
DataSource="@DataSource">
<TreeMapEvents OnItemClick="@click" TValue="CarSalesDetails"></TreeMapEvents>
<TreeMapLeafItemSettings LabelPath="Company">
</TreeMapLeafItemSettings>
<TreeMapLevels>
<TreeMapLevel GroupPath="Continent">
<TreeMapLevelBorder Color="white" Width="0.5">
</TreeMapLevelBorder>
</TreeMapLevel>
</TreeMapLevels>
</EjsTreeMap>
</div>
<div style="display:@display">@company</div>
@code {
public string display = "none";
public string company = "LeafItem";
public void click(IItemClickEventArgs<CarSalesDetails> args) {
if (args.GroupIndex != 0) {
display = "block";
company = args.GroupName;
}
else {
display = "none";
}
}
}
|