Another use for FF Chartwell: Plotting X and Y coordinates

The chartwell font is a unique font that uses ligatures and stylistic sets to create both percentile graphs (such as pie graphs) as well as bar graphs. More information on the font can be found here.

Using this font solves an ongoing issue for users of Data Merge within InDesign: how to create variable graphs or charts using the data in the linked text file only. First suggested by David Blatner’s InDesignSecrets piece, the last Colecandoo blogpost examined some “hacks” to further improve on the font in creating variable graphs or charts

There is a particular font in this family called Chartwell Bars that has a distinct advantage over the others in the family and that is that, when utilising the stylistic set, the font can represent whole values between 1-1000, whereas all other fonts in the family will represent only whole values between 1-100.

However, an unintended and alternative use for Chartwell Bars makes it perfect for plotting X and Y coordinates for producing variable results. To demonstrate how, take the following example of a blood pressure chart that is part of a data merge that contains two fields – the X and Y axis of the chart.

Using a combination of Data Merge, Anchored Objects and the “no fill, no stroke” trick (demonstrated on this blog before) to the Chartwell Bars font, the “your result” callout is able to move in two dimensions according to the result of the Data Merge.

montageTo show how this works, it is perhaps best demonstrated by showing the textframe that contains the “your result” callout that is an anchored object. The type that has no fill or stroke has been coloured black so it is clear how the trick works.

trickrevealedIf preparing a one-off chart, obviously placing the “your result” callout would be far easier and faster than the trick demonstrated, but if preparing hundreds or thousands of charts as part of a data merge, this trick is certainly worthwhile.

A PDF demonstrating the proof of principle can be found here. Unlike other PDFs available for download from Colecandoo, this does not contain working files within the PDF due to licencing restrictions of the font.

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”

 

 

Live Text Masking in InDesign

Until now, to make a text-mask with InDesign, type normally has to be converted to curves so that the type can now be treated like a placeholder. This works fine until the type has to change, such as:

  • Correcting a typographical error;
  • Including more text or resizing it; or
  • During a data merge.

In these instances, it would be ideal for the type to still be live so that changes could be made while maintaining the masking of the type.

Surely someone had thought of this before… but instead of being an easy search in Google, it took hours of research to find this little nugget of information from the Phoenix InDesign Users Group:

Excited, I followed the instructions to the letter, but discovered that this trick isn’t true text masking. Let me explain.

A text mask created the usual way of converting to curves and then placing the image within the new shape works this way:

However, a text mask created using the tutorial from the Users Group behaves more like a stencil. That is, it does mask the image, but shows the stencil:

This is fine if the background is white… but in this instance the background is pale yellow. The solution in this instance is to make the image to be masked sent to the background, and the image which is in the background become the foreground:

So while this technique works, it does not work as well as masking within shapes, given that:

  • not all effects (drop shadows, bevels, transparencies) can be applied to the masked text; and
  • the background effectively is brought forward; and the item to be masked is effectively in the background.

This technique also works with background images. To demonstrate this, I’ve upgraded an earlier post featuring “Square Pegs Round Holes” to demonstrate how this masking works with live text.

As usual, files for the above demonstration can be found here.

Make find/change behave more like a Word macro

Recently on the Adobe Forums, I have responded to several posts from fellow users wondering how to “chain” find and change or GREP searches so that they are performed all at once rather than one at a time. It is possible to do but it is hardly documented anywhere, and needs a significant amount of tweaking and a basic knowledge of a text editor and reading code before it is of any real use.

“Chaining” searches has many advantages. For example, where a document has many double spaces, double returns, etc, normally each find/change would need to be run one after another. If chained together, the search need only be performed once. This is ideal for formatting text with inconsistent spacing.

To users out there who just want a “quick fix” and a better solution, there are two external links to point to:

  • The first is a text cleaner by Keith Gilbert and is Mac only and can be found here.
  • The second is a proprietary plug-in which is mentioned in other posts on this site but is not only great; but how i feel the actual InDesign software should have been shipped. It is called Multi Find/Change and is written by Automatication and can be found here.

For users either not prepared to spend a cent and/or wanting to get their hands dirty, read on…

In Adobe InDesign, there is a script which ships with adobe indesign called findchangebylist.jsx. There is also a subfolder in the script folder called FindChangeSupport.

What findchangebylist.jsx does is it loops many find/greps together by referencing a text file of the changes which is in the FindChangeSupport folder. This text file is called  FindChangeList.txt. If this is opened up in textedit, notepad, textwrangler, whatever text editor of your choice, find/grep searches are listed here. It’s all pretty cody though.

However, if you go to the FindChangeSupport folder and change the name of this FindChangeList.txt to FindChangeList2.txt for example and then run the findchangebylist.jsx, the script does not run. Instead, a dialog box asks which file to open. From here, you can then navigate to the FindChangeList2.txt file and open it.

At work,  I have several different text files which each contain various finds/greps which i may need to run for different projects, and they are named Yearbookfix.txt or businesscardfix.txt etc, and then i run the findchangebylist.jsx and then navigate to whatever file i need to run.

Sadly as i’ve said before, it is all fairly cody. Here is an example of one line of a find/change routine line in one of the scripts which I use at work:

grep    {findWhat:”\\s\\r”}    {changeTo:”\\r”}    {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}

In simple english, this line tells the find/change to behave as a GREP, and to look for any space followed by paragraph return and to change it to a paragraph return only. It is also telling the GREP to search footnotes, master pages and hidden layers.

But for me to add a new search parameter to this textfile without really knowing how to write the code is quite daunting.

Luckily, there is another script which effectively takes a change made in the find/change dialog box and writes the code for you. It is called RecordFindChange_CS3-CS5.jsx and is written by Kasyan Servetsky.

The way this script works is you would type in the find/grep which you want in the find/change dialog box, and once it is typed into the dialog box and ready to search, run the RecordFindChange_CS3-CS5.jsx. Within moments, a textfile will appear with the pre-coded form of the find/grep which can then be cut and added to the txt file containing your customised find/greps.

In terms of learning more about the power of GREP searches, go to the indesignsecrets.com GREP portion of their website. Otherwise, theindesigner.com‘s Michael Murphy has some excellent resources.

%d bloggers like this: