Telerik Forums
UI for WPF Forum
2 answers
60 views
Is it possible to select an item programatically? After I bind the TreeMap control I would like to select a default item.
Martin Ivanov
Telerik team
 answered on 06 Jul 2020
1 answer
55 views

I would like to know how to get my CustomMapping to run the Apply method. I have a list of animals and the speed of the animals should control the colour of the treemapitem. However when the animals speed changes then the treemap tiles don't change colour but on startup the colours visible. They just never change. When the animals size changes the tiles do reflect the changes. How do I run the Apply method?

 

<telerik:RadTreeMap x:Name="treeMap" ItemsSource="{Binding TreeMapList}" LayoutStrategy="Squarified">
        <telerik:RadTreeMap.TypeDefinitions>
            <telerik:TypeDefinition TargetTypeName="TreeMapItem"
                                        ValuePath="AnimalSize"
                                        LabelPath="Animal"
                                        ToolTipPath="ToolTip">
                <telerik:TypeDefinition.Mappings>
                    <local:ValueColourMapping  MinValue="{Binding MinCurrentSpeed}" MaxValue="{Binding MaxCurrentSpeed}" Field="CurrentSpeed" />
                </telerik:TypeDefinition.Mappings>
 
            </telerik:TypeDefinition>
        </telerik:RadTreeMap.TypeDefinitions>
    </telerik:RadTreeMap>

 

Vladimir Stoyanov
Telerik team
 answered on 27 Jan 2020
3 answers
76 views

Hi,

I have a RadTreeMap that's working perfectly except that I want its labels to be centered vertically and horizontally within each rectangle.

I'm also using a Colorizer:

<telerik:TypeDefinition.Mappings>
      <telerik:DesaturationColorizer From="1" To="0.1" StartColor="#d9ac26"/>
</telerik:TypeDefinition.Mappings>

...so, when I attempt to change use a TextBlock with the proper alignment:

<Style TargetType="telerik:RadTreeMapItem">

     <Setter Property="Template">
           <Setter.Value>
                <ControlTemplate>
                     <TextBlock Text="{Binding Label}" HorizontalAlignment="Center"  VerticalAlignment="Center"/>
                 </ControlTemplate>
            </Setter.Value>
       </Setter>
</Style>

...it successfully centers the labels, but I lose the colorizing effect. How can I make the TextBlock respect the intended colorizing?

Wayne

n/a
Top achievements
Rank 1
 answered on 21 Sep 2019
2 answers
137 views
We’re using a couple of other Telerik controls that incorporate selection, but few if any swap to using a hand cursor for selection. We’d like to enabled selection in the Tree Map but override the default cursor so that it uses the standard Arrow cursor. Is this possible without modifying the underlying source for the control?
Chris
Top achievements
Rank 1
 answered on 09 May 2018
2 answers
22 views

I have the following Apply method that has been working:

        protected override void Apply(Telerik.Windows.Controls.TreeMap.RadTreeMapItem treemapItem, object dataItem)
        {
            BranchIntegrationDetails details = dataItem as BranchIntegrationDetails;
            SolidColorBrush brush = PickBrush(details);
           
            // Apply the color
            treemapItem.Background = brush;            // Apply additional text
            IntegrationStatisticsControl statisticsControl = new IntegrationStatisticsControl()
            {
                VerticalAlignment = System.Windows.VerticalAlignment.Bottom,
                HorizontalAlignment = System.Windows.HorizontalAlignment.Right,
                Foreground = ForegroundBrush,
                Margin = new System.Windows.Thickness(0,0,10,0)
            };
            statisticsControl.SetValue(Grid.RowSpanProperty, 2);
            Grid grid = treemapItem.ChildrenOfType<Grid>().ElementAt(1);
            grid.Children.Add(statisticsControl);
        }

The expected output can been in the first picture (see "expected.png").

 When I add the theme file into my app.xaml:

            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="StyleResources.xaml" />
                <ResourceDictionary Source="TelerikTheme/Telerik.Windows.Controls.xaml"/>
                <ResourceDictionary Source="TelerikTheme/Telerik.Windows.Controls.DataVisualization.xaml"/> <!-- this one is bad -->
                <ResourceDictionary Source="TelerikTheme/Telerik.Windows.Controls.Navigation.xaml"/>
            </ResourceDictionary.MergedDictionaries>

The control that I want to apply does not anymore (see "unexpected.png"). The same code is still working, I can see my control is added to the Grid, just I could not know why it is not showing.

Sia
Telerik team
 answered on 05 May 2015
3 answers
100 views
I am using a horizontally sliced TreeMap. Is it possible to control the VERTICAL distance (Y-Direction)?  I understand the horizontal distance is determined by the values (X-Direction).  

Ideally, the space would be equidistant vertically with all 3 groups having the same vertical distance.  Similar to a Grid with 3 RowDefinitions where Height="*"

Current XAML:
01.<telerik:RadTreeMap x:Name="TreeMap"  Grid.Row="0" Grid.Column="2"
02.  ClipToBounds="True" >
03. 
04.     <telerik:RadTreeMap.LayoutStrategy>
05.          <telerik:SliceDiceStrategy Orientation="Horizontal" />
06.     </telerik:RadTreeMap.LayoutStrategy>
07. 
08.     <telerik:RadTreeMap.TypeDefinitions>
09.           <telerik:TypeDefinition TargetTypeName="ModelInfo"
10.              ValuePath="Value" ChildrenPath="Children" LabelPath="Name"
11.              ItemStyle="{StaticResource IcicleStyle}" />
12. 
13.            <telerik:TypeDefinition TargetTypeName="GroupInfo"
14.              ValuePath="Value" ChildrenPath="Children" LabelPath="Name"
15.              ItemStyle="{StaticResource IcicleStyle}" />
16. 
17.            <telerik:TypeDefinition TargetTypeName="EventInfo"
18.              ValuePath="Value" LabelPath="Name"
19.              ItemStyle="{StaticResource IcicleStyle}" />
20. 
21.      </telerik:RadTreeMap.TypeDefinitions>
22. 
23.</telerik:RadTreeMap>

StaticResource IcicleStyle:

1.<Style x:Key="IcicleStyle" TargetType="telerik:RadTreeMapItem" >
2.    <Setter Property="Control.Background" Value="White" />
3.    <Setter Property="MaxHeight" Value="50" />
4.    <Setter Property="FontFamily" Value="Segoe UI" />
5.    <Setter Property="FontWeight" Value="SemiBold" />
6.    <Setter Property="Margin" Value="-1" />
7.    <Setter Property="Padding" Value="0" />
8.</Style>


A screenshot of the current layout is attached.  If you look at the last section labelled "S", Ideally,  (S.Height === %G1.Height).  Even if I remove the third level of data {1,2,3,4}, the result is the same.

Any help is appreciated.

Thanks,
Jacob
Petar Marchev
Telerik team
 answered on 27 Aug 2014
1 answer
145 views
I am using telerik RadTreeMap control. It is showing error when we use DLL Telerik.Windows.Controls.DataVisualization, version- 2013.3.1316.45 is not supporting. when I use version - 2013.3.1316.40 then it work fine. But all over in our application we already used the DLL of version 2013.3.1316.45 and we cant use the old version DLL 2013.3.1316.40. So how we can use the DLL version 2013.3.1316.45 In RadTreeMap application, please give the solution as early as possible.

Thanks and regards
Shreejit Nechipurat

Martin Ivanov
Telerik team
 answered on 22 Aug 2014
7 answers
112 views
I can't for the life of me get anything to show up in either the designer or at runtime. It's just blank, as if the control is not there. I'm using 2014.1.224.45 with implicit themes.
Martin Ivanov
Telerik team
 answered on 12 Jun 2014
1 answer
32 views
Is there an easy way to change the display order of Categories?  The categories are showing up in the display of the Pivot map  ( A  B )  I want them to show up ( B  A )  How do I specify the order?

Thanks
Paul
Petar Marchev
Telerik team
 answered on 10 Jun 2014
1 answer
62 views
I wonder if there is a way (other than feeding Log(x)) to render TreeMap charts to use logarithmic values?

I can feed the log(x) as the value but tooltips would not be equal even I'd convert the value using exp(x).
Nikolay
Telerik team
 answered on 21 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?