Tuesday, February 12, 2008

Make Your .NET Data More Useful with Treemap Visualization

Someday someone will port this to Silverlight...  

The Microsoft Treemap control requires your XML to be formatted in a particular way in order to successfully parse and render the data. An example of this XML is seen in the following code:


<Nodes EmptySizeMetric="0">
<Node Text="Americas" SizeMetric="50" ColorMetric="-40.1" ToolTip="Americas">
<Nodes EmptySizeMetric="0">
<Node Text="USA" SizeMetric="100" ColorMetric="0" ToolTip="USA">
<Nodes EmptySizeMetric="0">
<Node Text="Texas" SizeMetric="20" ColorMetric="40" ToolTip="Texas">
<Nodes EmptySizeMetric="0"/>
</Node>
<Node Text="California" SizeMetric="60" ColorMetric="0" ToolTip="California">
<Nodes EmptySizeMetric="0"/>
</Node>
</Nodes>
</Node>
<Node Text="Canada" SizeMetric="20" ColorMetric="200" ToolTip="Canada">
<Nodes EmptySizeMetric="0"/>
</Node>
</Nodes>
</Node>
<Node Text="Europe" SizeMetric="25" ColorMetric="100" ToolTip="Europe">
<Nodes EmptySizeMetric="0"/>
</Node>
</Nodes>

Source: Make Your .NET Data More Useful with Treemap Visualization

No comments: