© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
A. BoxIntroducing Charticulator for Power BIhttps://doi.org/10.1007/978-1-4842-8076-8_10

10. Guides and Anchoring

Alison Box1  
(1)
Billingshurst, West Sussex, UK
 

Have you been wondering why elements of your Charticulator chart won’t stay where you put them when you click the Save button? Have you attempted yet to put a title on your x- or y-axis but to then find it suddenly moves elsewhere on the canvas? If the answer is yes to these questions, then read through this chapter because by doing so you will learn that to prevent elements placed on the canvas or in the Glyph pane from wandering around, they must be anchored to either one of the default guides or to a custom guide that you have placed there. In this chapter, we will be looking at how we work with the default guides, how we can create our own guides, and how to anchor elements to these guides.

Consider the chart in Figure 10-1. All the elements you see in this chart have been anchored to either default guides or user-created guides to prevent them from moving away from where they were placed. Some elements were anchored by default, including the plot segment and the rectangle mark, but other elements had to be anchored to custom guides including the chart title, the x- and y-axis titles, the legend, and the black circle symbols in the glyph.
Figure 10-1

Chart elements are anchored to prevent wandering

When we save this chart, all these elements will stay where you see them now and won’t suddenly appear someplace else. To see how we arrived at this happy state of affairs, let’s first look at the two different types of guides to which we can anchor elements, that is, the default guides and user-created guides, and then we will focus on the anchoring process itself.

Default Guides

When you first create a chart, you have a number of default guides created for you both on the canvas and in the Glyph pane. On the canvas, they appear as faint gray lines, and they mark out the margin space and the center points horizontally and vertically. The plot segment must be anchored to these guides; see Figure 10-2.
Figure 10-2

The plot segment anchored to the default guides on the canvas

You will also spot the green dots at the intersection of the margin guides. These are visual indicators that the plot segment (or any other chart element) has been anchored to the guides. If the dot is white, then the element has not been anchored (see the section on “Anchoring to Guides” below).

In the Glyph pane, the guides mark out the boundary of the glyph and also the center points, both horizontally and vertically. The marks and symbols comprising the glyph must be anchored to these guides; see Figure 10-3.
Figure 10-3

The glyph must be anchored to the default guides

However, you can add your own guides to the canvas or to the Glyph pane and anchor elements to them.

Creating Your Own Guides

You can create your own horizontal or vertical guides by clicking the Guides button on the toolbar and selecting either Guide X or Guide Y. Confusingly, there are two of each on the dropdown, but Figure 10-4 shows which are guides and which are guide coordinators. We need to select a guide.
Figure 10-4

Selecting guides or guide coordinators from the toolbar

Now click into either the chart canvas or the Glyph pane to create the guide. The custom guide will now be listed in the Layers pane. You can change the position of your custom guide by selecting the guide in the Layers pane and open the Attributes pane for the guide. The custom guide can be offset from one of the default guides on the canvas or in the Glyph pane. For example, for horizontal guides, the guide must be offset from the Top, Middle, or Bottom guide. In Figure 10-5, for example, we have offset the custom guide from the default guide at the Top of the canvas.
Figure 10-5

Offsetting a custom guide from a default guide on the canvas

Of course, you can also just drag on a guide to reposition it. Any chart element anchored to the guide will move accordingly.

Creating Guide Coordinators

Guide coordinators are a set of multiple vertical or horizontal guides that are evenly spaced. You are given two guides by default, but you can increase the number as required. You can add horizontal or vertical guide coordinators to either the canvas or the Glyph pane by clicking the Guides button dropdown on the toolbar and selecting, for example, Guide X or Guide Y; see Figure 10-4. To secure the guide coordinator, you must anchor it to a default guide by dragging along the guide (Figure 10-6). You can then edit the number of guides in the coordinator by using the Attributes pane of the guide coordinator.
Figure 10-6

Positioning a horizontal guide coordinator in the Glyph pane

Once positioned on the canvas or in the Glyph pane, you are not able to drag to adjust their spacing as you can with vertical or horizontal guides.

Anchoring to Guides

Once you’ve added your guides or guide coordinators to the canvas or Glyph pane, you can start to anchor elements to them. Every element in your Charticulator chart must be anchored to either a default guide or a custom guide or guide coordinator. All chart elements have anchor handles that show as green dots. To anchor an element, either drag the anchor handle onto the intersection of a horizontal and a vertical guide or drag and draw the element inside the boundaries of a guide. For anchoring text marks, you can just click onto the intersection of a guide. You must ensure that the green anchor handles are anchored to a guide, or the element will move of its own accord when you save your chart.

Tip

If the dots are white with a green border, this indicates that the element has not been anchored.

For instance, to add a chart or an axis title to the canvas, first add guides so you can anchor the text mark. Then click the text mark button on the toolbar and click onto the canvas at the intersection of two guides when you see the green anchor point; see Figure 10-7.
Figure 10-7

Adding a text mark to the canvas for a chart or axis title

You can see some more examples of anchoring chart elements and glyph elements to guides in Figure 10-8.
Figure 10-8

Anchoring chart elements and glyph elements to guides and guide coordinators

The guides that were used in the chart in Figure 10-1 to anchor the different elements are shown in Figure 10-9.
Figure 10-9

Guides used on the canvas and in the Glyph pane

In Figure 10-9, you can see that on the chart canvas we have added two vertical guides (Guide X) to anchor the y-axis title and the legend and two horizontal guides (Guide Y) to anchor the x-axis title and the chart title. In the Glyph pane, there are two horizontal guides to anchor the black symbol in the correct position on the glyph.

In this chapter, you’ve learned that all elements of a Charticulator chart must be anchored to a guide, and you must create your own guides to anchor any additional elements you’re thinking of placing on the canvas or in the Glyph pane. The upshot of this is that at long last you can put titles on your chart and on your x- and y-axes, something that up to this point, you weren’t able to achieve successfully. You may be thinking that adding titles to a chart is much simpler in a Power BI visual, but just consider the reality that in Power BI, you can’t place chart elements at specific positions, and so you’ve little control over where the elements lie.

Being able to anchor elements of your chart to custom guides also now enables you to move forward with exploring another key feature of Charticulator charts, and that is using multiple plot segments, each of which must be anchored to guides, in effect creating visuals within visuals. This is definitely one of Charticulator’s unique selling points, so without further ado, let’s move on to the next chapter where you will discover that by using more than one plot segment, you can step up your game in designing engaging visuals that truly tell the story of your data.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.166.122