This is a migrated thread and some comments may be shown as answers.

TreeMap - title and centered data

1 Answer 174 Views
TreeMap
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 21 Jun 2018, 09:20 PM

For the cell content in a treemap, in addition to the title text I would like to have a secondary piece of data that is centered in the cell. 

It would also be nice if the font size of the centered item changes with the size of the cell  (i.e. big cell == big font, small cell == small font)

Are either of those things possible?

 

1 Answer, 1 is accepted

Sort by
0
Stamo Gochev
Telerik team
answered on 25 Jun 2018, 10:25 AM
Hello Michael,

The content displayed in each tile can be customized with the "template" option:

https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/treemap/configuration/template

The secondary piece of data can be added after the default value by making an additional HTML element and centering it with CSS.

Regarding your second question - you can use the template option and render elements with different CSS classes in order to provide the corresponding font size for each of them as shown in the following Dojo example:

https://dojo.telerik.com/IYoceHof/2

Regards,
Stamo Gochev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
TreeMap
Asked by
Michael
Top achievements
Rank 1
Answers by
Stamo Gochev
Telerik team
Share this question
or