LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need some help with a .NET treemap control

I have been trying to get this control populated with no luck...
 
It is a free treemap control from microsoft.
 
Any help would be appreciated.
 
Thanks
-Tim C.
1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!
Message 1 of 24
(4,921 Views)
What have you tried? Attached is an example using 8.2 and .NET 2.0 which replicates the example provided in the help file for the component. Note that I have not done complete error handling.
Message 2 of 24
(4,917 Views)
Sweet example, 
 
I was trying to get the Tree Map Control populated via the tree map generator. 
 
I was hoping to be able to use the zoom and scroll capabilites of the tree map control.
 
Any chance you could look at that aspect?
 
Thanks in Advance
Tim C.
1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!
0 Kudos
Message 3 of 24
(4,906 Views)
I did not notice there was a separate TreemapControl control that could be used on Windows Forms. Since a control is already available you can simply place a .NET container on the front panel and insert a TreemapControl control into the container. This would replace the constructor node for the TreemapGenerator, and you would not need the Draw Invoke node or the PictureBox. See Example2 attached.

As for the zooming, according to the documentation you need to pass in a Node object so that it zooms in on that node. It seems that the best way to do this is to register a callback for the NodeMouseDown event, as that will return to you the Node that was clicked. You can then pass this to the ZoomIn method.

I did not see any scrolling methods.
0 Kudos
Message 4 of 24
(4,901 Views)

Very Nice!

A couple questions:

 

1.  What is the min / max color metrics all about?  seems like an odd setting if you are setting node colors yourself?

2.  Do you know if there are any rendered type rectangle options?  I ask because the other visulaition componets from

the microsoft treemp site shows some bubble charts and spiral charts that show the data points as rendered bubbles.

3.  I noticed the treemap generator is not used if the treemap control is used,  this is where I was off track,  it was my understanding that the generator fed the drawn Nodes to the treemap control,  appearently not....

3.  If I want to set the border and padding settings where would I do that in your layout?

 

Thanks

Tim C.

 

1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!
0 Kudos
Message 5 of 24
(4,896 Views)
Unfortunately, you're asking questions that are specific to that control, and I didn't see that control until you posted it, so I have no experience with it. With respect to your questions:

1) Haven't a clue. Check the documentation.
2) Haven't a clue. I'm also not sure which site you're referring to.
3) The TreemapGenerator class is meant to be used if you want to draw a treemap onto your own bitmap or do any other kind of custom drawing. The TreemapControl class/control is meant to be used on a Windows Form (though it can be used in a .NET container on a LabVIEW front panel). As such, it has its own set of events, such as a user clicking on a node. If you were to use the TreemapGenerator and draw onto your own bitmap then you would need to handle the events for whatever control you used to house the bitmap (as the PictureBox did in my first example).
4) In the Property Node where the MinColorMetric, MaxColorMetric, etc are set you just need to add another element and select PaddingEx. Same thing for border, with the BorderStyle and BorderColor properties.
0 Kudos
Message 6 of 24
(4,889 Views)

Would this be a bear to convert to a .NET control so folks could have cushioned tree maps in LV?

 

http://sourceforge.net/projects/windirstat/

 

Best Regards

Tim C.

1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!
0 Kudos
Message 7 of 24
(4,879 Views)
Well, that's certainly a completely different question. Considering that the code for that app is written using MFC, then, yeah, it probably would be a pain. Perhaps RC Converter published by DudeLabs may be something you want to look at.
0 Kudos
Message 8 of 24
(4,875 Views)

Hello

Any chance you could try to run the examples you made?  For some reason they seem to have quit working on my machine.

I reinstalled the control but no luck.  LV says there was an error loading the control "an error occured while trying to load the assembly"

It's wierd it just happened out of the blue,  it was working when I left, made no changes and opened the example the following day and it doesn't work.

 

one time when I was trying to fix it LV said the control was updated to the latest version, not sure what that meant...

Thanks

Tim C.

 

1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!
0 Kudos
Message 9 of 24
(4,858 Views)

I think this is the answer from anather thread

http://forums.ni.com/ni/board/message?board.id=170&message.id=272494&query.id=74486#M272494

 

Basically the solution was to add the file to a project and place the .NET control into the project directory

 

-Tim C.

1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!
0 Kudos
Message 10 of 24
(4,855 Views)