Articles in this section

How to Control Width and Color of the Bar in Angular Bullet Chart?

Description

This article explains how to control the width and color of the feature bar in an Angular Bullet Chart.

Solution

The Bullet Chart component contains two primary visual elements: feature bars and target bars. This guide focuses on customizing the feature bar.

Controlling Bar Width:
Use the valueHeight property to adjust the height (or thickness) of the feature bar. This allows you to fine-tune the visual weight of the bar within the chart.

Controlling Bar Color:
The valueFill property defines the fill color of the feature bar. You can bind this property to a color value from the data source, allowing each bar to display a unique color dynamically.

Code Snippet

let data: Object[] = [
   {
       requiredStories: 20, completedStories: 25, name: 'David', color: "#7f84e8"
   },
   {
       requiredStories: 25, completedStories: 20, name: 'Asif', color: "#dd8abd"
   },
   //..
   ];
 let chart: BulletChart = new BulletChart({
     valueHeight: 10,
     valueFill: 'color'
 });

Output Preview

The following image illustrates the output of the above code.

kb2.png

Live Example

View Sample in Stackblitz

Conclusion

We hope you enjoyed learning about How to control the width and color of the bar in an Angular Bullet Chart.

You can refer to our Angular Bullet Charts feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our Angular Bullet Charts example to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, BoldDesk Support, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied