Adding a Drop Shadow

Making the text stand out on the graphics

I’ve deliberately positioned this particular tip to follow the “filling an area” description because it provides an opportunity to demonstrate the principle to a slightly better effect.

In the meantime, we’ll start with our code for our area graph.

There have been several opportunities where I have wanted to place text overlaid on graphs for convenience sake, only to have it look overly messy as the text interferes with the graph.

Is this evil?

Now, I’ll be the first to say that the principle of overlaying text on a graph is probably not best practice, but sometimes you’ve got to do what you’ve got to do. Besides, sometimes it’s a valid idea. If I remember rightly, the first time I came across this idea, it was being used to highlight text when positioned on bars of a bar graph. So, it’s not always an evil practice.

Anyway, what we’ll do is leave the area fill in place and place the title back on the graph, but position the title so that it lays on top of the fill like so:

Get hands-on with 1200+ tech skills courses.