Treemap features

10 posts, 0 answers
  1. MohanRajP - PmR
    MohanRajP - PmR avatar
    14 posts
    Member since:
    Aug 2012

    Posted 14 Aug 2012 Link to this post

    Hi,
     Telerik treemap supporting these below features
    1. Color can get from legend or any other control it should be supplied by user selection (code behind)
    2. Label item can be contain two items (like hyperlink and image)
    3. Each item can have click event
    4. Colorizer min and max value can be supplied in code behind

    Thanks & Regards,
    MohanRajP
  2. Yavor
    Admin
    Yavor avatar
    401 posts

    Posted 17 Aug 2012 Link to this post

    Hello Mohan,

    1) You can use our ValueGradientColorizer. It is a colorizer, which contains a set of GradientStops. It chooses the brush to be applied according to the RadTreeMapItem's value and colorizer's gradient stops. Each GradientStop.Offset value can be absolute or relative (between 0 and 1) depending on the IsAbsolute property value. 

    2) RadTreemap allows you to specify a custom item template for your nodes (items with children) and your leaves (items without children). In your TypeDefinition add ItemTemplate like this: 

    <telerik:TypeDefinition TargetTypeName="Folder" ValuePath="Size" LabelPath="Name" ChildrenPath="Children" ToolTipPath="Size">
        <telerik:TypeDefinition.ItemTemplate>
            <telerik:HierarchicalDataTemplate ItemsSource="{Binding Children}">
                <HyperlinkButton Content="{Binding Label}" />
            </telerik:HierarchicalDataTemplate>
        </telerik:TypeDefinition.ItemTemplate>
    </telerik:TypeDefinition>
    Now all of the Folders will use a hyperlink button to display their label.

    3) You can enable selection by setting the IsSelectionEnabled to True and hooking up the SelectionChanged event.

    4) All colorizers can be created and set-up in code behind.  Kind regards,
    Yavor
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. MohanRajP - PmR
    MohanRajP - PmR avatar
    14 posts
    Member since:
    Aug 2012

    Posted 10 Sep 2012 Link to this post

    Hi Yavor,
     I have a class and properties of
    parent
    name
    nodetype
    weightage
    metricvalue

    service returns a collections of those, contains nodetype of 2 items Equipment and Target

    I have to bind those two different Items to Treemap with two different typedefinitions.
    how to bind thorugh from viewmodel context


    Regards,
    MohanRajP
  4. Yavor
    Admin
    Yavor avatar
    401 posts

    Posted 13 Sep 2012 Link to this post

    Hi Mohan,

    You can describe the types you want to bind to in your xaml. If you have 2 types that you want to be displayed in your treemap then you need 2 type definitions - 1 for each different type (like the file - folder scenario). Then you can feed your treemap with data from your view model.

    I have prepared a small sample app that demonstrates this approach. It shows the file - folder scenario in action.

    Kind regards,
    Yavor
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

  5. MohanRajP - PmR
    MohanRajP - PmR avatar
    14 posts
    Member since:
    Aug 2012

    Posted 14 Sep 2012 Link to this post

    Hi,
     I add same colorizer for two diff typedefinition like

     

     

    this.AssetTreeMap.TypeDefinitions[0].Mappings.Add(colorizer1);
    this.AssetTreeMap.TypeDefinitions[1].Mappings.Add(colorizer1);

    but its not working both, only one working.

    why and how to apply diff typedefintions same colorizer at run time

    please reply asap

     

  6. Yavor
    Admin
    Yavor avatar
    401 posts

    Posted 18 Sep 2012 Link to this post

    Hi Mohan,

    Mappings are bound to the type they are declared on (from the type definition). In other words they map a certain type (Folder, File, etc) to something else (color, gradient brush, etc). This means that you cannot use the same mapping for 2 type definitions. What happens is that the last type definition owns the mapping for its type.

    You can fix this issue by creating a separate mapping for each type definition.

    All the best,
    Yavor
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

  7. MohanRajP - PmR
    MohanRajP - PmR avatar
    14 posts
    Member since:
    Aug 2012

    Posted 15 Oct 2012 Link to this post

    Hi Yavor,
     Thank you for your support and helping.
    I need a exact sample of Treemap Selection demo sample. But I need to bind dynamic collection instead of hard coded.
    Can you send me a sample asap.

    Regards,
    MohanRajP
  8. Yavor
    Admin
    Yavor avatar
    401 posts

    Posted 17 Oct 2012 Link to this post

    Hi Mohan,

    The source code of the demos is available for download from your account page. In this particular demo the treemap is bound to a static collection of data. You can easily change that by making the collection observable so that the treemap can listen for updates. Another approach, although it is not recommended because it is slower, is to change the ItemsSource of the treemap.

    All the best,
    Yavor
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  9. Mingxue
    Mingxue avatar
    26 posts
    Member since:
    Apr 2016

    Posted 31 May in reply to Yavor Link to this post

    Hi,

    I have to borrow from this thread because the website hangs and doesn't load when I tried to create a new ticket. We are using PivotMap to display some data, and PivotMap is constantly invoking exceptions to the UI thread for:

    ==============================================================================

    Cannot call Arrange on a UIElement with infinite size or NaN. Parent of type 'Telerik.Windows.Controls.TreeMap.TreeMapPanel' invokes the UIElement. Arrange called on element of type 'Telerik.Windows.Controls.TreeMap.RadTreeMapItem'.

    ==============================================================================

    An easy test is to give two data, one with float.Max / 2, and another is to give a 0.0001, this will repro.

    My question is:

    1. What is the largest number that TreeMap/PivotMap can support?

    2. Should I normalize my data before giving it to TreeMap/PivotMap?

    3. Even if I normalize my data, I could still run into issues where a comparatively large number say float.Max/2 comparing 0.0001. What should I do?

    4. Is negative number supported? The TreeMap/PivotMap automatically order the items based on the size/magnitude, but if I have both positive and negative numbers that I want to view in TreeMap/PivotMap, how can I ask TreeMap/PivotMap to order them based on the actual value?

  10. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2976 posts

    Posted 02 Jun Link to this post

    Hi Mingxue,

    Regarding the exception and Question 1, can you send us more code so we can replicate this on our side  and advice more precisely. You can change some of our SDK samples if this is more convenient for you.

    As for the negative values  (questions 2-4). They are not directly supported in terms that there is no good way to visualize area representing negative value. For that purpose Bar Chart with bars below 0 and bars above 0 are better visual representation. However you might need to visualize area for one property but also indicate other negative / positive values for the same business object. If this is the case, you can take a look at our AbsoluteValueBrushColorizer (check its detailed description on the left, the code for WPF is actually pretty similar).

    Regards,
    Petar Mladenov
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top