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

DataWeight is reversed?

2 Answers 42 Views
TagCloud
This is a migrated thread and some comments may be shown as answers.
Jerry
Top achievements
Rank 1
Jerry asked on 24 May 2012, 05:43 PM
I'm able to successfully render the tagcloud, but for some reason the font weight is reversed? I.e. heavier weighted items have a smaller font than lower weighted items. 

<telerik:RadTagCloud ID="RadTagCloud1" runat="server"  renderitemweight="true" MaxNumberOfItems="40" TakeTopWeightedItems="true"
    DataMember="DefaultView" DataSourceID="SqlDataSource3" datatextfield="display_term" dataweightfield="document_count" maxfontfize="700%" MinFontSize="300%"
    WordsToExclude="a,about,after,all,also,an,and,are,not,as,at,be,been,but,by,can,could,did,do,does,problem,each,for,from,get,had,has,have,he,her,him,his,how,i,if,in,into,is,it,its,just,me,more,most,my,not,of,on,or,our,said,see,shall,she,should,so,some,than,that,the,their,there,they,this,those,to,up,used,was,we,were,what,when,which,while,who,why,will,with,would,you,your" ForeColor="White">
</telerik:RadTagCloud>

2 Answers, 1 is accepted

Sort by
0
Accepted
Slav
Telerik team
answered on 29 May 2012, 11:24 AM
Hello Jerry,

There appears to be a typo in the name of the property MaxFontSize. As a result a default value of 20px is assigned to this property, which is less than the value of the MinFontSize property, and the size is reversed. If you configure the RadTagCloud as shown below, its items will be displayed as expected:
<telerik:RadTagCloud ID="RadTagCloud1" runat="server" RenderItemWeight="true" MaxNumberOfItems="40"
    TakeTopWeightedItems="true" DataTextField="display_term" DataWeightField="document_count"
    MaxFontSize="700%" MinFontSize="300%" WordsToExclude="a,about,after,all,also,an,and,are,not,as,at,be,been,but,by,can,could,did,do,does,problem,each,for,from,get,had,has,have,he,her,him,his,how,i,if,in,into,is,it,its,just,me,more,most,my,not,of,on,or,our,said,see,shall,she,should,so,some,than,that,the,their,there,they,this,those,to,up,used,was,we,were,what,when,which,while,who,why,will,with,would,you,your">
</telerik:RadTagCloud>


All the best,
Slav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jerry
Top achievements
Rank 1
answered on 29 May 2012, 05:47 PM
Slav - Thank you, that fixed it! 
Tags
TagCloud
Asked by
Jerry
Top achievements
Rank 1
Answers by
Slav
Telerik team
Jerry
Top achievements
Rank 1
Share this question
or