Skip to main content

ASPxCloudControl.RankCount Property

Gets or sets the number of ranks.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.2.dll

NuGet Package: DevExpress.Web


[DefaultValue(typeof(byte), "7")]
public byte RankCount { get; set; }

Property Value

Type Default Description
Byte "7"

A Byte value that specifies the number of ranks.


Item font sizing is automatically selected based on the distribution of their weight. The ASPxCloudControl normalizes the weight of all the items so that they fit in the integer range specified by the RankCount property. By default, the number of ranks in the range equals 7 (1 - 7). Each rank is associated with a particular font size. The minimal rank (1) is associated with the smallest font size specified by the control’s Font.Size property. The font sizes that correspond to other ranks are automatically calculated by the ASPxCloudControl. The greater the rank, the larger the font.

The algorithm that normalizes item weights is specified by the ASPxCloudControl.Scale property.

For instance, if the linear distribution is used (the ASPxCloudControl.Scale property is set to Scales.Linear), the weighted list ranges from 1 to 70 and the RankCount property is set to 7. The smallest font size is applied to items whose weight ranges from 1 to 10. The largest font size is applied to items whose weight ranges from 61 to 70, respectively.


The following sample code demonstrates how to customize the appearance of the ASPxCloudControl control.

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register assembly="DevExpress.Web.v8.3, Version=, Culture=neutral, 
PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxCloudControl" tagprefix="dxcc" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 

<script runat="server">

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using DevExpress.Web.ASPxCloudControl;
using System.Linq;
using System.Xml.Linq;

public partial class _Default : System.Web.UI.Page 
    protected void Page_Load(object sender, EventArgs e) {
        ASPxCloudControl1.ShowValues = true;
        ASPxCloudControl1.RankCount = 3;
        ASPxCloudControl1.Scale = Scales.Linear;
        ASPxCloudControl1.Sorted = true;
        ASPxCloudControl1.ForeColor = System.Drawing.Color.AntiqueWhite;
        ASPxCloudControl1.HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Justify;

        ASPxCloudControl1.RankProperties[0].ForeColor = System.Drawing.Color.Black;
        ASPxCloudControl1.RankProperties[0].ValueColor = System.Drawing.Color.Gray;

        ASPxCloudControl1.RankProperties[1].ForeColor = System.Drawing.Color.Blue;
        ASPxCloudControl1.RankProperties[1].ValueColor = System.Drawing.Color.LightBlue;

        ASPxCloudControl1.RankProperties[2].ForeColor = System.Drawing.Color.Red;
        ASPxCloudControl1.RankProperties[2].ValueColor = System.Drawing.Color.Pink;



<html xmlns="">
<head runat="server">
    <title>Untitled Page</title>
    <form id="form1" runat="server">
        <dxcc:ASPxCloudControl ID="ASPxCloudControl1" runat="server" 

        <asp:XmlDataSource ID="XmlDataSource1" runat="server" 

See Also