Copied RSS Feed

Angular

How to Highlight Key Data Points Using Annotations in Angular Charts?

TL;DR: Let’s see how to highlight key data points using annotations in Angular Charts. We’ll use text annotations to label peak and low rainfall periods and images for better visualization. These elements enhance readability and improve data interpretation. Follow the code examples to integrate annotations seamlessly!

Annotations are additional elements added to a chart to provide detailed information, highlight specific data points, or draw attention to areas of interest. They can be text, images, shapes, or even HTML elements that are positioned at specific coordinates within the chart. Annotations enhance the readability and interpretability of charts by providing context, emphasizing key insights, and making data more accessible to the viewer. They can be customized based on user requirements.

In this blog, we’ll demonstrate how to highlight key data points using annotations in Syncfusion Angular Charts. Here, we’ll show you how to add text and images as annotations.

Note: Before proceeding, refer to the getting started with Angular Charts documentation.

Adding text annotations in Angular Charts

By using annotations, you can enhance the readability and interpretability of your charts, making it easier for viewers to understand and analyze the data.

Refer to the following code example. Here, we’ll use the Angular Charts to display the rainfall pattern in Washington D.C., United States – 2023. To easily identify the periods of low and peak rainfall, we’ll add text annotations to highlight these key data points. This makes it simple to understand when the rainfall was at its lowest and highest.

<e-annotations>
  <e-annotation content="<div>High Rainfall <br> Recorded</div>" coordinateUnits="Point" x="Jul" y="13"></e-annotation>
  <e-annotation content="<div>Low Rainfall <br> Recorded</div>" coordinateUnits="Point" x="Feb" y="8"></e-annotation>
</e-annotations>

Refer to the following image.

Adding text annotations in Angular Charts

Adding image annotations in Angular Charts

Adding images or icons as annotations allows us to add graphical elements that represent specific data points or insights. This method can make your chart more engaging and help emphasize important information more effectively.

Refer to the following code example. Here, we’ve used two different images to represent the least and peak rainfall points.

<e-annotations>
   <e-annotation content="<div id="chart_cloud"><img src="./cloud.png" alt="Cloud Picture" style="width: 41px; height: 41px"/></div>"  coordinateUnits="Point" x="Jul" y="12.5"></e-annotation>
   <e-annotation content="<div id="chart_sun"><img src="./sun.png" alt="Sun Picture" style="width: 41px; height: 41px"/></div>" coordinateUnits="Point" x="Feb" y="7.25"></e-annotation>
</e-annotations>

Refer to the following image.

Adding image annotations in Angular Charts

References

For more details, refer to the adding annotations in the Angular Charts demo on StackBlitz and documentation.

Harness the power of Syncfusion’s feature-rich and powerful Angular UI components.

Conclusion

Thanks for reading! In this blog, we’ve seen how to highlight a data point by adding annotations in the Syncfusion Angular Charts for better data visualization. We encourage you to try these annotation options and leave your feedback in the comments below.

To try our Charts, please download our free trial. You can also check out our online demos for a more in-depth look at what you can do with the Charts component.

For questions, you can contact us through our support forumssupport portal, or feedback portal. We are always happy to assist you!

Meet the Author

Veerakumar Narayanasamy

Veerakumar Narayanasamy is a skilled software engineer at Syncfusion, where he plays a pivotal role in advancing the development of high-quality web components. With a deep passion for the latest web technologies, He focuses on building solutions that drive exceptional user experiences and robust product functionality. Leveraging his expertise in modern web development, he contributes to the Syncfusion team by creating scalable, efficient, and cutting-edge applications that meet the diverse needs of developers and end-users alike. His commitment to innovation and quality ensures that the products he develops not only stay relevant but also push the boundaries of web technology.