Categories: Tutorials

Custom string labels (annotations) for data sets

Continuing with the series on how to get the most out of the new features of FusionCharts v3.1, here’s our latest – custom string labels (annotations) for individual data sets. In case you tuned into the series just now, here’s what we have already covered:

Back to the topic at hand – custom string labels. Let’s call them annotations for the sake of brevity. Annotations make a chart more information-intensive, thus enhancing decision-making. Let’s look at an example before we dive into the details:

See how neatly we have appended the labels “Birthday Discount – 30%” and “New Website” to explain the increase in sales for March and May respectively. And the XML going behind this is no rocket science either:

<chart caption="Monthly Sales for Jan-Jun 2008" useroundedges="1" numberprefix="$" bgcolor="”FFFFFF”" decimals="0">
</chart>

All of what you need to do is just over-write the default display value with your own text, using the displayValue attribute. And because we over-wrote the default display value for the data sets, we had to put in the figures $60K and $58K manually.

Without annotations, you would have a chart with only the sales figures plotted in it and every time you wanted to know why a particular month showed an increase or decrease in sales, you would have probably referred an Excel file which had all these details. But with annotations, all of the information that you need for your decision-making comes neatly packed as a whole – so not only can you make decisions backed with concrete numbers, you can make them much faster now.

While the example shown above is a very clichéd one, there are a multitude of other places that you can use it too – website stats with annotations like “Increased Page Rank” or “System Maintenance”, company expenditures with annotations like “Pizza Day” or “The Big Party” or even in your personal weight chart with “The 10K Run” or “The Free Booze Night.”

sanket

Recent Posts

Announcing FusionCharts v4.1: Elevate Your Data Visualization Experience!

We’re excited to announce the upcoming release of FusionCharts v4.1—a groundbreaking step forward in the…

5 days ago

Bubble Maps: Visualizing Data Like Never Before

Have you ever been overwhelmed by a massive data set and wondered, "How do I…

2 weeks ago

Stock Charts: Mastering the Art of Visualizing Financial Data

If you’ve ever tried to make sense of the stock market, you’ve probably come across…

4 weeks ago

What is a Bar Chart Used For?

Imagine you’re comparing the sales performance of your top product lines across different regions, or…

2 months ago

AI-Powered Documentation for Data Visualization & Analytics

Have you ever spent hours buried in documentation, hunting for a specific piece of code?…

3 months ago

Unveiling the Hidden Gems: Top 5 AI Data Visualization Tools for 2024

Do you feel like your data is a cryptic puzzle, locked away from revealing its…

4 months ago