kwolo.treemap.net
1.0.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package kwolo.treemap.net --version 1.0.1
NuGet\Install-Package kwolo.treemap.net -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="kwolo.treemap.net" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add kwolo.treemap.net --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: kwolo.treemap.net, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install kwolo.treemap.net as a Cake Addin #addin nuget:?package=kwolo.treemap.net&version=1.0.1 // Install kwolo.treemap.net as a Cake Tool #tool nuget:?package=kwolo.treemap.net&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Treemap Algorithms .Net
This project is based on the Java sources published by the University of Maryland See http://www.cs.umd.edu/hcil/treemap/ for more info on the original projects.
Compatibility
The project was built and tested using C# on dotnet core 3.1
License
See License.md for information on licensing and intellectual property rights.
Brief intro
See the original site for more detailed info but, in brief:
- Create a list of
IMappable
objects and set their sizes - Create a new root
TreeModel
, passing it the root item - Add child
IMappable
as newTreeModel
objects to the root, using itsaddChild()
method - Get the tree model to lay out its children, by calling the root's
getTreeItems()
method - Create a new
SquarifiedLayout
object - Call
layout()
on theSquarifiedLayout
object, passing the mappable items from #4 and the bounding rectangle
For example:
private static TreeModel BuildTreeModel(IMappable data)
{
return AddTree(data, 0);
}
private static TreeModel AddTree(IMappable item, int depth)
{
item.setDepth(depth);
var tree = new TreeModel(item);
// The assumption here is that the item inherits from IMappable
// and has a list of children
item.Children.ForEach(c =>
tree.addChild(
AddTree(c, depth + 1)
));
return tree;
}
var data = GetSomeData() // Inherits from IMappable, with child objects
var tree = BuildTreeModel(data);
var bounds = new Rect(0, 0, BoundsWidth, BoundsHeight);
var layout = new SquarifiedLayout();
tree.layout(layout, bounds);
See the Integration Tests for a more complete example.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.1 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 3.1
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.