Comments on: Open Source Flex Component: TreeMap 2.0 (Beta) https://joshblog.net/2008/05/26/open-source-flex-component-treemap-2-beta/ Archive of older blog posts written by Josh Tynjala about Flash, Flex, and ActionScript Wed, 26 Jun 2013 02:52:46 +0000 hourly 1 https://wordpress.org/?v=4.9.9 By: treemaps « HIDIHO! https://joshblog.net/2008/05/26/open-source-flex-component-treemap-2-beta/#comment-7219 Sat, 16 Apr 2011 16:00:46 +0000 http://www.zeuslabs.us/?p=238#comment-7219 […] Flex by Josh Tynjala […]

]]>
By: Josh Tynjala https://joshblog.net/2008/05/26/open-source-flex-component-treemap-2-beta/#comment-951 Tue, 21 Oct 2008 01:36:10 +0000 http://www.zeuslabs.us/?p=238#comment-951 Devver, it seems you copied your XML directly instead of reformatting it, so my blog software just stripped most of it out. I edited your comment above to make it obvious that the code is missing.

To answer your question, if your data follows a different structure than the default XML handler (called a data descriptor) used by Tree and TreeMap, then you need to create your own custom data descriptor.

You’ll want to implement the interface mx.controls.treeClasses.ITreeDataDescriptor (and possibly ITreeDataDescriptor2). See mx.controls.treeClasses.DefaultDataDescriptor to see how Adobe implemented the default version.

]]>
By: Devver https://joshblog.net/2008/05/26/open-source-flex-component-treemap-2-beta/#comment-950 Tue, 21 Oct 2008 00:45:48 +0000 http://www.zeuslabs.us/?p=238#comment-950 I am attempting to use this component but with a different structure for the xml, but I seem to be failing miserably.

The structure you outline in your sample is like so

[Removed by blog software. Use <tagname> in the future!]

The system I am working with does not use this format. It returns data like so

[Removed by blog software. Use <tagname> in the future!]

I have tried allot of things but the component does not seem to be able to handle this structure. What is need to support this style.

]]>
By: Open Source Flex Component: HeatMap - Josh Talks Flash https://joshblog.net/2008/05/26/open-source-flex-component-treemap-2-beta/#comment-949 Tue, 16 Sep 2008 19:09:20 +0000 http://www.zeuslabs.us/?p=238#comment-949 […] the process of building this component very straightforward. There are many similarities to my treemap component, but the heatmap is a bit simpler in many regards. One thing I particularly enjoyed about building […]

]]>
By: Nola Programmer https://joshblog.net/2008/05/26/open-source-flex-component-treemap-2-beta/#comment-948 Mon, 28 Jul 2008 18:46:56 +0000 http://www.zeuslabs.us/?p=238#comment-948 yeah thats that part I can’t figure out, I thought I duplicated everything. Anyway now I have a workaround so I can just tinker with it at my leisure, eventually I’ll find it. Something to do with the
itemToToolTip function.

]]>
By: Josh Tynjala https://joshblog.net/2008/05/26/open-source-flex-component-treemap-2-beta/#comment-947 Mon, 28 Jul 2008 18:41:51 +0000 http://www.zeuslabs.us/?p=238#comment-947 The default creationPolicy only creates components once they’re visible. When you view the second treemap first, the first treemap isn’t shown, so it doesn’t get created right away. Some of your code that references the first treemap is running, but the first treemap is still null.

]]>
By: Nola Programmer https://joshblog.net/2008/05/26/open-source-flex-component-treemap-2-beta/#comment-946 Mon, 28 Jul 2008 16:44:31 +0000 http://www.zeuslabs.us/?p=238#comment-946 creationPolicy=”all” in the TabNavigator fixed the problem. I’m not sure exactly why though. as you said, it does increase load time a bit but we can live with that if necessary.

I actually did basically copy all the functions, so I have for example itemToToolTip1() and a completely seperate itemToToolTip2() etc.

I did the same for all of the key functions.

Thanks for the advice there Josh, we really love your Treemap, we think it’s the best we found of several other options we evaluated including some of the commercial ones.

N.P.

]]>
By: Josh Tynjala https://joshblog.net/2008/05/26/open-source-flex-component-treemap-2-beta/#comment-945 Mon, 28 Jul 2008 15:33:41 +0000 http://www.zeuslabs.us/?p=238#comment-945 Nola, it’s probably caused by the creationPolicy in your TabNavigator. You’re viewing the second TreeMap first, so the first TreeMap hasn’t been created. So, when your itemToToolTip() function is called, treeMap is null. Does your second TreeMap use the same itemToToolTip() function? You might want to give it its own function. Otherwise, in the worst case scenario, you can always set creationPolicy=”always” on the TabNavigator. This setting may impact initial startup performance, though.

]]>
By: Nola Programmer https://joshblog.net/2008/05/26/open-source-flex-component-treemap-2-beta/#comment-944 Mon, 28 Jul 2008 14:59:20 +0000 http://www.zeuslabs.us/?p=238#comment-944 Hi Josh,

We have been using your treemap in a dashboard successfully for a while now, but I just ran into a problem. We included the treemap with some other components, each in their own tab. I made a second treemap on another tab -all within the same mxml file which I know is a bit unorthodox. Until recently it was working fine, but then I ran into a strange problem. we used to have the treemap setup so that “treemap1” opened up first, but if we open the second treemap first instead, we get an “error 1009:Cannot access a property or method of a null object reference.”

It seems to error out in the itemToToolTip function, on the line
if(this.treeMap.dataDescriptor.isBranch(item))

The wierd thing is, if I start with the first treemap, it works fine, if I start with the second treemap, it gives me this error.

I know this is very vague and ill-defined but I was just wondering if you might have any intuition about what may be causing this?

]]>
By: Josh Tynjala https://joshblog.net/2008/05/26/open-source-flex-component-treemap-2-beta/#comment-943 Fri, 30 May 2008 16:08:29 +0000 http://www.zeuslabs.us/?p=238#comment-943 Thanks, Maz. I’m glad you found it useful.

]]>