Same font size for same weight in 2 clouds

2 posts, 0 answers
  1. Benny
    Benny avatar
    33 posts
    Member since:
    May 2009

    Posted 28 Mar 2014 Link to this post

    Is there any possibility to get the same font size for the same weight in 2 clouds? (Both clouds have the same height and with)

    example
    GIVEN Cloud 1:
    bacons - weight 100
    ribs - weight 10

    GIVEN Cloud 2:
    ribs - weight 10
    doner - weight 5

    THEN
    ribs in both clouds should have the same font size
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 02 Apr 2014 Link to this post

    Hello Benny,

    The behavior RadTagCloud offers is to have items vary their font size between the min and max font size available, according to their weight. Thus, items with different weight cannot have the same font-size. If you can make the difference proportional (i.e., the weight of the ribs item in the second control to be 10 times lower than the weight of the heaviest item, as it is in the first control), then you could get the same appearance. Note that items would need to match - the heaviest and the lightest should have the same weight in both controls, so the item with the same weight can have the same size. The idea is to make sure the calculation will be the same for both controls. You could do this with dummy items with no text so they will take as little space as possible:
    <telerik:RadTagCloud runat="server"  ID="rtc1" Width="300px" Height="200px">
        <Items>
            <telerik:RadTagCloudItem text="bacon" Weight="100" />
            <telerik:RadTagCloudItem text="ribs" Weight="10" />
            <telerik:RadTagCloudItem Text="" Weight="5" />
        </Items>
    </telerik:RadTagCloud>
    <telerik:RadTagCloud runat="server"  ID="rtc2" Width="300px" Height="200px">
        <Items>
            <telerik:RadTagCloudItem Text="" Weight="100" />
            <telerik:RadTagCloudItem text="ribs" Weight="10" />
            <telerik:RadTagCloudItem text="doner" Weight="5" />
        </Items>
    </telerik:RadTagCloud>
    Note that we cannot guarantee if/how this is possible in your actual case. The original requirement that in different contexts an item should have the same size in all cases does not fit the concept of the control and is, generally, not possible.

    Regards,
    Marin Bratanov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top