ComponentOne BulletGraph for WinForms
Work with BulletGraph / BulletGraph Caption
In This Topic
    BulletGraph Caption
    In This Topic

    A caption helps to provide helpful information to the user about the control. Similarly, the caption (or textlabel) of the C1BulletGraph conveys the information being represented by the bullet graph, such as sales, revenue, expenditure, customer count, number of defects and so on. It is mainly used for identifying the featured measure.

    bulletgraph-caption

    The image above shows the caption of the BulletGraph control. Here, it is revenue.

    The bullet graph caption can be added and customized using the Caption property of C1BulletGraph class. This property is of the type BulletGraphCaption class and can be used to define the text, alignment and position of the bullet graph caption using the TextAlignment and Position properties respectively. The BulletGraphCaption also exposes the Height and the Width properties to specify the height and width of the bullet graph caption.

    The code below shows how you can set the caption of the BulletGraph control:

    'Sets the caption text
    C1BulletGraph1.Caption.Text = "Revenue YTD ($1000s)"
    'Sets the alignment Of the caption relative To its layout rectangle
    C1BulletGraph1.Caption.Alignment = StringAlignment.Near
    'Sets the position Of the caption relative To the graph
    C1BulletGraph1.Caption.Position = BulletGraphCaptionPosition.Left
    'Sets the width Of the caption
    C1BulletGraph1.Caption.Width = 55
    'Sets the height Of the caption
    C1BulletGraph1.Caption.Height = 40
    
    //Sets the caption text
    c1BulletGraph1.Caption.Text = "Revenue YTD ($1000s)";
    //Sets the alignment of the caption relative to its layout rectangle
    c1BulletGraph1.Caption.Alignment = StringAlignment.Near;
    //Sets the position of the caption relative to the graph
    c1BulletGraph1.Caption.Position = BulletGraphCaptionPosition.Left;
    //Sets the width of the caption
    c1BulletGraph1.Caption.Width =55;
    //Sets the height of the caption
    c1BulletGraph1.Caption.Height = 40;