Advertisements

Data Merging Charts and Graphs with FF Chartwell

lumbergh

The Data Merge feature of InDesign is great for merging text, but cannot take the text and parse it into a graph or a chart. This feature may be available through plug-ins purchased separately to Creative Suite/Cloud, but having the ability to create data merge projects that feature variable graphs or charts using only InDesign would be welcomed by many users.

In 2011, this site provided a proof of principle that pie charts and bar graphs could in fact be created via InDesign, Excel and Illustrator. Those interested can see those articles here and here.

Despite proving a point, the technique had several flaws:

  • The Excel files contained many formulas that were very complicated for the average user and likely to cause problems if the original database was replaced at any time;
  • The appearance of the graphs were limited to the graphics created in Illustrator, meaning any changes to the appearance of the graphs were complicated;
  • With the setup of the placed images used to make the charts, only one kind of graph could be merged at once.

It would be almost a year until InDesignSecrets co-host David Blatner wrote this piece concerning a solution using the FF Chartwell font created by the FontFont foundry:

Prior to this post, the FF Chartwell font had been considered as a solution but after reading David’s article, the issue was revisited. Reading the instructions for the FF Chartwell font looked promising, and the decision was made to bite the bullet and purchase the font.

Using the font (full instructions are available with the purchase of the font but can also be found here and this video here) has several advantages over my previous solutions:

  • Easy to set up;
  • The same data can presented using different charts in the same data merge record;
  • The appearance of the chart can take advantage of GREP styles, Nested styles, and the effects dialog box;
  • PDF processing time is faster with smaller size PDFs as a result.

There are some limitations that should be spelled out prior to a purchase of this font:

  • Most charts represent figures from 0-100. This is fine for percentile charts such as pie, rose, ring or radar charts, but limits the use of bar and line graphs;
  • While the font allows a pie graph to turn into a donut, be aware that the hole is made using a fill colour rather than being transparent;
  • The data in the charts must be integers (e.g. whole numbers, no fractions) and this means rounding results up or down accordingly. For percentile charts it is also important to make sure the total of figures in the data adds up to 100.

Tweaks or hacks to further improve the charts

There is a bar graph that represents figures from 0-1,000; but the graph appears from left to right and starts with a diamond shape. For those wanting a usual bar chart, here is the workaround.

  1. Use the Chartwell bars font to represent the number between 0-1000, and format according to the Chartwell instructions; but change the fill/stroke of the font to none.
    mergepic1
  2. In the paragraph palette, select paragraph rules and then select above line to the size of the text, using whatever size is felt necessary.
    mergepic2
  3. Now that the chart displays as rectangular start/finish bars, change the rotation of the textbox that contains the chart to 90 degrees rotation.
    mergepic3

A similar solution can be used when using a segmented bar graph, but instead of using the paragraph palette, use the character palette to create individual underlines for each segment. This can be further improved upon using GREP styles.

The illustration below was a bar graph using a paragraph style that had both above and below strokes, and the bottom has been clipped by putting the text box into its own frame.

mergepic3a

To make a piechart have a true donut hole rather than a solid circular fill (as shown in the picture below) follow these steps:

mergepic4

  1. Draw a circle the size of the desired hole and place it where the hole has to appear in the pie chart. Give this hole a paper fill and using the effects palette, set the opacity to 0%
  2. Select both the drawn circle and textbox that contains the pie chart and group them
  3. From the effects palette, check the checkbox that says “Knockout Group”

 

 

Advertisements

Centering “fit frame to images” using InDesign CS6

UPDATE 2020/01/02 – Since the release of InDesign 2020, new methods have been added to InDesign’s Data Merge content placement options. However, this article will remain for posterity.

In mid February, a post on the Adobe Forums asked the question:

I’m using Data Merge to place a single image on each page.  I have the frame centered on the page and its reference point set to the center.  I have the Data Merge options set to “Fit frame to content”, but when I run the merge all the images align to the top left corner of the frame.  The frame expands or contracts as directed, but I would like for it to expand from the center.  What am I failing to do?
 

The question was answered:

It doesn’t work for “fit frame to images” – instead the frame fitting options take the measurement from the top left.
 

Image fitting options in Data Merge are explored in greater depth in the “Merge Right” article in issue 52 of InDesign Magazine. Ultimately, there is a checkbox in the Content Placement Options dialog box of Data Merge that is misleading – it is the “Center Content” button. This button centres the content within its frame, but not the frame to its relative position on the page. For most of the fitting methods, this is fine, but for the “fit frame to images” option, the frame size will change whenever the image size changes, and when it does, the image resizes from the top left of its position on the page, rather than from the centre point of the image.

A solution was provided to the poster along these lines:

  1. Create a text box larger than the largest image that is part of the merge. Align the text to be centered not only left and right, but top and bottom (from the text frame options). If done correctly, the flashing cursor should be in the center of the textbox.
pic1
  1. Draw a new graphic frame and assign the image field of the data merge to the frame.
  2. Cut and paste it into the textbox. If done correctly the box should be centered within the textbox.
pic3 merged
  1. Make sure that Image Placement dropdown of the Content Placement Options from the Data Merge panel is set to “fit frame to images”
pic2

The solution is also flexible in that the image can be aligned to left, center or right horizontally, and/or top, center or bottom vertically.

pic4 merged

The solution works… provided the text box is big enough for the images within the data merge… otherwise the item becomes overset and the image disappears.

pic5

It is also a somewhat clunky solution as it means having a large textbox in the document simply to position an image.

An alternate solution would be to draw a larger than normal frame with the “Center Content” turned on using the “preserve frame and image size”, but if the content was to have an outline on it then this solution would not be appropriate.

pic6 merged

However, CS6 introduces a new text frame feature called auto size. This is handy for not only making text boxes fit the type only, but for creating minimum sizes and allowing the box to “grow” when more text is added, based on the auto-size instructions in the options.

Using this new feature, we can take the earlier solution and apply the auto-size to the text box that is housing the now inline graphic. I can now also control where the image “grows” from using the auto-size instructions, rather than using the text alignment features of the text box.

pic7

The other great feature is that I can use anchored objects with this image too… something that I could not normally do with an image frame as anchored objects can only anchor to text frames. In this case I’ve added a fancy caption bar that uses anchored objects of its own to grow/shrink the caption as the data comes in.

pic8 merged

So scrolling from record to record, I can see that the images are indeed starting from their reference point in the auto-size dialog box, and that the caption anchored object is always staying in its position at the top right of the picture.

pic9

When merged to single page merges, this trick works fine… however when I merge to multiple records per page… it goes haywire.

pic10

Despite this bug, this trick is also handy even if data merge isn’t being used. As a snippet or a library item, as not only does caption stay in the same relative position to the image regardless of where the image is moved, but there is more flexibility as to how the caption can be positioned or designed.

The file used for this article can be found here. To keep the file size down, the original links have been removed so that substitute the links and merge file can be used to try this out.

Effects plus live type equals effective VDP

Variable Data Printing (VDP) campaigns can be a great way of not only targeting a particular audience, but also getting their undivided attention. Sadly, much of the marketing utilising the latest and greatest VDP technology to target their audience are still relying on the old-fashioned greeting “Dear your name”.

While this blog isn’t a guide to marketing and nor does it profess to be, I just think that with the technology available in Adobe InDesign’s Data Merge, do VDP campaigns have to be stuck in the 50s style “Mad Men” campaigns?

In the past, the blog has demonstrated how to make contemporary campaigns with salutations displayed as:

  • Pencil-case letters
  • Scrabble letters
  • As part of a cartoon
  • Name badges
  • Street signs

Some of the samples use complex Excel files to break up names into individual letters to create the merge, but others use nothing more than live type to spice up the delivery of the reader’s name. On that note, if type can have an effect applied to it, then any VDP campaign can be taken to the next level.

For this post, I’ve just created a simple example using two live effects: One to look like writing in beach sand, and the other to look like clouds.

beachsplash

Admittedly applying both techniques to one campaign is overkill but the point is to illustrate that so long as effects can be applied to the live type, then creative effects like these can present the reader’s name in a more attention-grabbing fashion. The PDF (that contains all assets that made the PDF) can be downloaded here.

Effects that can be applied to live type are limited in InDesign. Effects such as distortions are limited to type on paths, the gravity effect (as applied on the sample) and the “square peg round hole” trick that can be found elsewhere on this blog. Other effects such as bevel/emboss, outer glows, drop shadows, feathers and satins are still available, as well as how they are applied to the layout such as the multiply effect, screen etc.

One individual who seems to make all text come to life is Mike Rankin who has a regular blog on Lynda.com known as InDesign FX and has other material on the indesignsecrets.com website. Also bringing these campaigns to life is the use of fonts that suit the effect being applied… that is for the beach sand example I decided to use a font that would look like a child’s handwriting as opposed to a serif or sans-serif font that is more appropriate for a letter or book.

I have recently found inspiration from the youtube channel Vsauce that has a regular episode titled DONG: an acronym for Do Online Now Guys. In a recent DONG, host Michael Stevens recommended the site says-it.com, a site for creating one-to-one web to jpg pictures. The site provides ideas – not always original – for VDP campaigns… but sometimes inspiration comes from the strangest places.

The bottom line: targeting a market is one thing, getting their attention is another. InDesign’s Data Merge can be a powerful tool for VDP campaigns, don’t limit communicating with clients with the old and tired “Dear your name” greeting.

%d bloggers like this: