25 Feb 20225 minutes to read

When the mouse is hovered over a bar in the Bullet Chart, the tooltip displays important summary about the actual and the target bar values.

Default Tooltip

By setting enableproperty to true. By default tooltip is visible in bullet-chart. The tooltip is not visible by default. To make it visible, set the enable property in the tooltip to true.

                        .Title("Profit in percentage")
                        .Tooltip(tp => tp.Enable(true))
                        .Ranges(rn =>
public IActionResult Index()
            List<DefaultBulletData> bulletData = new List<DefaultBulletData>
                new DefaultBulletData { value = 5, comparativeMeasureValue = 7.5, category= "2001"},
                new DefaultBulletData { value = 7, comparativeMeasureValue = 5, category= "2002"},
                new DefaultBulletData { value = 10, comparativeMeasureValue = 6, category= "2003"},
                new DefaultBulletData { value = 5, comparativeMeasureValue = 8, category= "2004"},
                new DefaultBulletData { value = 12, comparativeMeasureValue = 5, category= "2005"},
                new DefaultBulletData { value = 8, comparativeMeasureValue = 6, category= "2006"}
            ViewBag.dataSource = bulletData;
            return View();
        public class DefaultBulletData
            public double value;
            public double comparativeMeasureValue;
            public string category;

Bullet Chart displays ToolTip

Tooltip Template

Any HTML elements can be displayed in the tooltip by using the template property of the tooltip. You can use the ${target} and ${value} as place holders in the HTML element to display the value and target values from the data source of corresponding data point.

Tooltip Customization

The following properties can be used to customize the Bullet Chart tooltip.

The fill and border properties are used to customize the background color and border of the tooltip respectively. The textStyle property in the tooltip is used to customize the font of the tooltip text.

  • fill - Specifies the color of tooltip.
  • border - Specifies the tooltip border color and width.
  • textStyle - Specifies the tooltip font family, font style, font weight, color and size.