© 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_5

5. 2D Region Plot Segments

Alison Box1  
(1)
Billingshurst, West Sussex, UK
 

In the last chapter, I showed you how to create a line chart using a symbol in the Glyph pane. You also learned something more important, that if you bind a numerical field to the y-axis, glyphs will be plotted against this axis according to their value, regardless of their shape or size.

However, you may be a little perturbed that as yet you don’t know how to create this simple clustered bar chart (see Figure 5-1) where the glyphs sit horizontally and the numerical legend is along the x-axis.
Figure 5-1

A Charticulator

The problem is that before you can create this bar chart, you must be aware of a key concept in Charticulator which is that the attributes of the plot segment determine the layout of a Charticulator chart. There are two different types of plot segment in Charticulator: 2D region and line. In this chapter, we will only be considering the 2D region plot segment (we will take a look at the line plot segment in Chapter 16) and will be taking a guided tour around the attributes of this chart element. In doing so, you will discover that it’s the sub-layout of the plot segment that is instrumental in determining the type of visual you will generate, whether it’s a column, bar, matrix, cloud, or jitter style of chart. You will also learn how to manage the more pedestrian elements of the chart design: the spacing, sorting, and alignment of the glyphs and also formatting axis labels and tick marks.

You can consider a 2D region plot segment as synonymous with a “plot area” in conventional charts. If you click “PlotSegment1” in the Layers pane, the plot segment will be selected on the chart, with the plot segment toolbar displayed above, as shown in Figure 5-2.
Figure 5-2

The 2D region plot segment with the plot segment toolbar

We’ve already seen the effect of binding fields to the X and Y Axis attributes of the plot segment and how this controls the layout of the glyphs within the chart. For instance, in Chapter 3, we saw that binding a categorical field to the X Axis attribute categorizes the glyphs along the x-axis according to that field. In Chapter 4, we bound a numerical field to the Y Axis attribute, and this generated a value axis that determined the layout of the glyphs on the chart, so much so that rectangle shapes behaved unintuitively and no longer sat neatly along the x-axis; see Figure 4-5.

In fact, the overriding factor in the layout of your chart is the fields you have bound to the x- and y-axes of the plot segment, the main layout if you like. Within these constraints, there is additional factor that influences the layout of the glyphs and that is the type of sub-layout that has been applied, from which there are six to choose. This is what will decide whether you end up with a column or bar chart, whether they’re stacked, clustered, or packed. It’s this attribute that will enable you to create the bar chart and indeed a host of alternative chart layouts. Sub-layouts are applied on top of the layout determined by the fields currently bound to the x- and y-axes, which always take precedence. This means that sometimes the sub-layout will be negated by the fields bound to the axes. For example, having two categorical axes will result in a grid layout even though the sub-layout is not set to “Grid” but to “Stack X.”

It’s the impact of axes, sub-layouts, and attributes of the plot segment that results in the final look and feel of your chart, and this is what you’ll be discovering in the content of this chapter.

Creating 2D Region Plot Segments

If you delete a plot segment, or you want to create an additional plot segment, you can use the Plot Segments button on the toolbar and select 2D Region. You can then draw your plot segment onto the canvas. Make sure you draw your plot segment within the guides of the canvas; see Figure 5-3. You can double-check you have drawn the plot segment correctly by confirming that each corner of the plot segment has a green dot.
Figure 5-3

Creating a 2D region plot segment

Drawing the plot segment will generate a plot segment layer within the Chart layers in the Layers pane.

Using Plot Segment Sub-layouts

You can understand that if the layout of the chart is determined firstly by fields bound to the axes, either categorical or numerical, and then further influenced by a specific sub-layout that has been applied, the combination of these factors can quickly become overwhelming, and it’s easy to lose sight of where you need to head to achieve your desired chart. As we explore how sub-layouts impact on our chart, therefore, we will start with a very simple chart where there are no fields bound to the axes and a glyph that comprises a single rectangle shape. Then we can start to look at the combined effect of adding categorical fields bound to the axes and selecting different types of sub-layout. Later, we can explore sub-layouts using symbols with numerical axes.

The chart I will be using in my examples is shown in Figure 5-4 where I have also

bound the categorical “Salespeople” field to the Fill attribute of a rectangle mark so we can distinguish between the glyphs as we change the layout.
Figure 5-4

A simple chart with no fields bound to axes

To find the sub-layouts of a plot segment, ensure you have “PlotSegment1” selected in the Layers pane, and then you can either use the Sub-layout attribute in the Attributes pane or the Stack X dropdown button on the plot segment toolbar; see Figure 5-5.
Figure 5-5

The sub-layouts of a Charticulator chart

The default sub-layout is Stack X, but you can choose one of five other sub-layouts:
  • Stack X (the default)

  • Stack Y

  • Grid

  • Packing

  • Jitter

  • Overlap

Let’s now explore each of these sub-layouts in turn.

Stack X

With this sub-layout, the glyphs are stacked vertically along the x-axis, ordered by the values in the first field of the underlying data or by how you have set the sort order in the Options button top right of the visual header. In our case, we are sorting by the “Year” field because this is the first field in the Fields pane. Notice what happens if we change the order of the fields in the Data bucket of Power BI so that “Salespeople” is now first; see Figure 5-6.
Figure 5-6

Stack X with no categorical or numerical axes uses the order of the fields to sort the glyphs

You could change this sorting order again by using the Options button, but nevertheless with no field bound to the x-axis, the sorting of the glyphs is not restrained by any x-axis grouping.

Stack X with a Categorical X-Axis

When we now bind a categorical field such as the “Year” field to the X Axis attribute of the plot segment, the layout changes to group the glyphs accordingly, irrespective of the order of the fields in the Fields pane, because the categorical axis always takes precedence in the layout; see Figure 5-7.
Figure 5-7

Binding a categorical field to the x-axis changes the layout

Once you have bound a categorical field to the axis, this will constrain the sorting of the glyphs to within each category.

Stack X with a Categorical Y-Axis

But look what happens if we bind the “Year” field to the Y Axis attribute instead. The glyphs are still stacked side by side for each salesperson but categorized by year down the y-axis; see Figure 5-8.
Figure 5-8

Binding a categorical field to the y-axis changes the layout

If we put the “Sales” field into the Width attribute (don’t forget that you can use the dropzone in the Glyph pane to do this), the chart reveals more insightful data. In fact, what we have created is a stacked bar chart; see Figure 5-9.
Figure 5-9

Using Stack X and a categorical y-axis to create a stacked bar chart

It’s worth mentioning here that it’s the binding of the data to the Width attribute that is instrumental in plotting the data and arriving at a meaningful visual.

Stack Y

Using the chart in Figure 5-4, where no fields are bound to either axis, and applying this sub-layout, we can see that the glyphs are now stacked horizontally down the y-axis (Figure 5-10).
Figure 5-10

The Stack Y sub-layout with no categorical axes

With regard to building our clustered bar chart, the chart in Figure 5-10 is looking promising. At least the glyphs are aligned in the correct direction.

Stack Y with a Categorical Y-Axis

All that’s now required to complete the bar chart is to bind a categorical field such as “Year” onto the y-axis. Then if you bind your numerical field to the Width attribute of the rectangle shape instead of the Height attribute, you’ll end up with a clustered bar chart. However, there is one thing still missing from our chart; a numerical legend on the x-axis to explain the lengths of the bars, so let’s now add in this legend.

Adding an X-Axis Numerical Legend

If you remember when we created our column chart, we generated a legend on the y-axis by using the Legend button on the top toolbar; see Figure 1-17. Clearly, we need to generate a similar legend that will sit along the x-axis. However, you will not be able to use the Legend button on the toolbar because the default numerical legend is only applicable to a y-axis. Instead, you’ll must click on “Shape1.Width” in the Scales pane, and in the dialog that pops up, click Add Legend; see Figure 5-11.
Figure 5-11

A with a legend on the x-axis

And that’s it. We’ve finally got there; we’ve built a clustered bar chart. But great progress as this is, we are still at the tip of the iceberg with regard to what sub-layouts can do for us.

Stack Y with a Categorical X-Axis

For this, let’s start again with our default chart as in Figure 5-4. A simple chart with no fields bound to axes. Apply a Stack Y sub-layout and now bind the “Year” field to the x-axis and bind “Sales” to the Height attribute. Because the category bound to the x-axis takes precedence, the glyphs are now categorized for each year along the x-axis, and the glyph for each salesperson is stacked on top, generating a stacked column chart; see Figure 5-12.
Figure 5-12

Stack Y with a produces a stacked column chart

I can appreciate that at this stage, you may be feeling that the different combinations of stacking along the x- and y-axes can be a little confusing. Figure 5-13 may help you understand these different combinations better.
Figure 5-13

The different combinations of Stack X and Stack Y

Understanding the stacking sub-layouts has enabled you to generate stacked and clustered bar and column charts. These types of charts are necessary when you are using two categorical fields, such as “Year” and “Salespeople,” so that both can be analyzed within the chart. What is particularly interesting about these two sub-layouts is what happens when you only have one category to worry about.

Stack X and Stack Y with One Category

In this scenario, we are using just two fields, one categorical and the other numerical, that is, “Salespeople” and “Sales.” We’ve created a chart using a rectangle mark and then bound the “Salespeople” field to the Fill attribute of the shape and the X Axis attribute of the plot segment. The default sub-layout is Stack X. Notice, however, that applying a Stack Y sub-layout has no effect on the layout of the chart (Figure 5-14) because the layout has already been determined by the x-axis field.
Figure 5-14

Plotting only one category on the x-axis determines the layout

Let’s consider another example of the impact of binding the categorical field to the axis when you only have one category. Looking at the chart in Figure 5-15, we’re analyzing our salespeople’s performance by designing a glyph whose height represents their sales value, stacked vertically. In this chart, we have only one category, “Salespeople,” but how would you generate this chart? It looks simple, but it hides some important aspects of sub-layouts vs. categorical axes.
Figure 5-15

A stacked column chart with only one category, for example, “Salespeople”

The starting point is easy. You would just create a rectangle mark, bind a numerical field to the Height attribute and a categorical field to the Fill attribute, and then use the Stack Y sub-layout. Increasing the left and right margins of the chart canvas by dragging inwards on the guides will then reduce the width of the chart. The chart looks promising.

But if you now bind a categorical field, for example, “Salespeople,” onto the y-axis to label the glyphs, this is not what we want. You can see how the chart has changed in Figure 5-16. Because the axis takes precedence, the glyphs are now plotted along the axis, and the category labels are equally spaced making the spacing of the rectangles look odd.
Figure 5-16

The chart is incorrect when a category is bound to the y-axis (on the right)

The chart was correct before we bound the y-axis field, so we need to remove this field from the Y Axis attribute. But how do we generate labels for the categories up the left side of the chart? To do this, you can attach a text mark to the left of the rectangle mark in the Glyph pane and bind the category to the Text attribute. The final embellishment is to add another text mark for the numerical value that shows inside the rectangle.

The moral of this story is that in Charticulator, you don’t always want to bind categories to axes! Charticulator is quite happy to render a chart with no fields bound to either the x- or y-axis.

Grid

The Grid sub-layout is perhaps the most challenging of the sub-layouts to get to grips with. The reasons for this can be numerous. Like all sub-layouts, its effect will be very different if you have no fields bound to the axes, one categorical axis or two categorical axes, remembering that axes take precedence over sub-layouts. Also, Charticulator uses a default grid size according to the number of glyphs it needs to arrange, and it’s not always apparent what this grid size is or how the glyphs have been arranged within it. In addition to these behaviors, the grid layout has attributes for orientation, direction, and count that can be combined in a mind-boggling variety of ways. You will find other aspects of this sub-layout take you by surprise. To explore some of these features of the Grid sub-layout, let’s keep it simple, using our original chart, and apply the Grid sub-layout; see Figure 5-17.
Figure 5-17

How the Grid sub-layout changes the layout of the

The Grid sub-layout looks very similar to the layout using Stack X with a categorical y-axis (Figure 5-8). What is the difference? The Grid sub-layout has no fields bound to the axes, and the layout is being driven solely by the sub-layout. This is where this sub-layout can come into its own. Consider the chart in Figure 5-18; you can see that the only factor determining the layout is the Grid sub-layout. In this visual, we’ve used a gradient color fill and text marks to show the values we want to analyze.
Figure 5-18

Using the Grid sub-layout removes the need for

We can now use some of the Grid options on the plot segment toolbar to rearrange the glyphs; see Figure 5-19.
Figure 5-19

Grid sub-layout options on the

You can also find these options under the Sub-layout attributes of the plot segment, and you will discover a few more options besides. Take note that there is a Count attribute that controls the number of glyphs in each grid space. I’ll let you explore these options yourself and see how you can change the layout of the grid. Why don’t you try adding a few more categorical fields to your data and embark on a voyage of self-discovery with Charticulator’s Grid sub-layout?

In the meantime, just think on this; in Power BI, the equivalent visual that uses a grid-like structure is the Matrix visual. You can only put numbers (i.e. measures) into the values area of a Matrix, not multiple values, text values, or shapes. Here’s a challenge for you; would you be able to reproduce the chart in Figure 5-18 using a Power BI Matrix? You can see my attempt in Figure 5-20 where you can also observe that in Power BI you are restrained by the conventional cartesian layout, and so you must supply both row categories and column categories.

Figure 5-20

The Power BI Matrix visual requires row and column labels

The Grid sub-layout is great therefore for reproducing matrix style visuals but with many more design options.

Packing

If you have no fields on the x- or y- axis, the Packing sub-layout will pack the glyphs into the center of the canvas. What is important to understand is that the Packing sub-layout uses the existing sub-layout of the plot segment. Therefore, if you start with the chart in Figure 5-4 where you have a rectangle mark as your glyph and Stack X as your sub-layout and you then apply a Packing sub-layout, the chart goes seriously haywire. If, on the other hand, you start with the chart in Figure 5-4 and first apply a Grid sub-layout and then apply the Packing sub-layout, things look a little less haphazard particularly if you then bind a numerical field to both the Height and Width of the rectangle mark; see Figure 5-21.
Figure 5-21

The Packing sub-layout applied on top of a

On the whole, however, Packing works best with the circle symbol where a numerical field has been populated into the “Size” attribute. Moreover, if you use a symbol, you don’t need to apply a grid sub-layout first. This can provide the basis of a “cloud” type chart, or you can bind a categorical field to the x-axis to produce a clustered style of chart; see Figure 5-22.
Figure 5-22

 on the Packing sub-layout using a symbol

The Packing sub-layout also works particularly well with a numerical axis. The default sub-layout when using a numerical axis is the Overlap sub-layout (see the section on “Overlap” below), but you can change this to Packing which gives you a different insight into your data. Consider the visual in Figure 5-23 where I’ve added a third category to our data, the “Region” field. I’ve then bound the “Year” field to the x-axis, “Sales” field to the y-axis, and also bound “Sales” to the Size attribute of the symbol.
Figure 5-23

Packing sub-layout with a symbol and a numerical

What a great visual for spotting outliers. What was salesperson “Charron” doing in 2020 that resulted in such an amazing sales performance?

Jitter

This sub-layout is used to show density of data points and works best when you have many data points to plot and with a symbol in the Glyph pane. To show you how it works, I’ve started with a new chart that has four categories, “Year,” “Month,” “Salespeople,” and “Regions,” and one numerical field, “Sales.”

Note

The months should sort correctly when you click Save.

I’ve then used a symbol in the Glyph pane and bound the “Year” field to the Fill attribute. We want to know in which months sales were densest, so I’ve bound “Year” to the x-axis and “Month” to the y-axis, generating two categorical axes. We know that the axes will dictate the layout of the chart, so with the default Stack X sub-layout, the symbols for each month in each year are all stacked side by side, and the chart does not give us any meaningful information. We can now apply the Jitter sub-layout and can see that in January 2020 sales were not as dense as sales in January 2021; see Figure 5-24.
Figure 5-24

The compared with the Stack X sub-layout

The thing to understand regarding the Jitter sub-layout is that the positions of the symbols in the chart have no relationship with the data and are randomly arranged; it’s just the number that are present for any category that is important.

Overlap

The Overlap sub-layout is used by Charticulator when you bind a numerical field to the x- or y-axis generating a numerical axis. This allows Charticulator to plot the glyphs according to the categories on the categorical axis. For instance, multiple salespeople may have the same sales value in any year, and therefore the glyphs must be able to sit on top of each other. As we have seen in Chapter 4, when we looked at the difference between a numerical axis and a numerical legend, if you’re using a numerical axis, then it makes sense to also use a symbol in the Glyph pane, and we can produce a chart that will look similar to Figure 5-25 where you will note the Overlap sub-layout.

What is particularly frustrating is that if you remove the numerical field bound to the axis, the Overlap sub-layout does not revert to Stack X (the default), but remains as the sub-layout on the chart. This can catch you out. If you were to then use a rectangle mark in the Glyph pane, the rectangles will sit on top of each other, and you may wonder where all your glyphs have gone. Be warned. I’m still falling into this trap!
Figure 5-25

If you use a numerical axis, you get the Overlap sub-layout

We’ve now completed our exploration of Charticulator’s sub-layouts and from now on will be putting them to good use. I think you can appreciate that with Charticulator, to achieve your design objective, it’s all to do with how you combine your x- and y-axis fields with a specific plot segment sub-layout. This has been the most important lesson in understanding plot segments.

Let’s move on to look at some of the other attributes of the 2D region plot segment. These allow you to control some of the more mundane matters surrounding plot segments such as sorting axis labels and spacing out the glyphs, among other things. Simple and mundane as these are, what we’ll appreciate is that in Charticulator we have many more choices over how and what we can sort, space, and align than we would using a Power BI chart.

We’ve already explored the sub-layout dropdown button on the plot segment toolbar, and now we can turn our attention to the other buttons on the toolbar which are concerned with aligning (horizontal and vertical) and sorting elements of the chart; see Figure 5-26.
Figure 5-26

The plot segment toolbar showing the

With regard to options for spacing and formatting glyphs and axis labels, you will find these in the Attributes pane.

Sorting Glyphs and Labels

The attributes of the plot segment that we’re going to explore here are those concerned with sorting the glyphs in the plot segment. To appreciate how Charticulator deals with sorting and to put this into context, it might be a useful exercise to compare sorting in Charticulator with sorting elements in a chart generated in Power BI. What we’ll learn is that firstly Charticulator approaches sorting in a completely different way and secondly that Charticulator gives us a lot more control over what and how we sort the data.

Sorting a Power BI Chart

Let’s consider the clustered column chart created in Power BI in Figure 5-27. You can see that you are not able to sort the columns.
Figure 5-27

A clustered column chart generated in Power BI showing the absence of sorting options

You might therefore be tempted to construct the column chart in Power BI by putting all your categorical fields into the Axis bucket and using “Expand all down one level in the hierarchy”; see Figure 5-28.
Figure 5-28

Using a Power BI chart, you can expand into subcategories which allows sorting

Notice that I’ve colored the columns by the Salespeople category so we can make a better comparison. What you will note is that like all Power BI visuals, the columns are sorted descending by value. If you want to re-sort the visual using the “More options” button, you will find that the sort order is determined by the order of the fields in the Axis bucket. To change the order of the categories, you need to change the order of the fields in the bucket; see Figure 5-29.
Figure 5-29

In Power BI, the are sorted in the order they appear

There are a number of frustrations here. Firstly, in order to sort the columns, you have to use a hierarchical structure and drill down. Secondly, you can’t sort by the value within a category. For example, you can’t sort salesperson “Reyer’s” sales ascending by Sales value, only by Year. Finally, notice that I’ve used unconcatenated x-axis labels which can be particularly problematic to sort.

Sorting in a Charticulator Chart

I think we’re done with looking at Power BI and have concluded that the sorting options are limited. Let’s now look at how Charticulator manages sorting. A conventional approach would be to use the “More options” button top right of the Charticulator screen, just as you would for any Power BI visual. However, Charticulator has its own sorting options, and once you start using these, they will override Power BI’s sorting options, so it’s best to sort using the options inside Charticulator. One of the key differences is that unlike Power BI, where you can only sort either the categories or the value, in Charticulator you can sort both the glyphs and the axis labels in any combination that is allowed by the layout.

Sorting the Glyphs

In the absence of a field bound to the x-axis which constrains the sorting of the glyphs, the default sort order is determined by Power BI’s default sorting options as seen on the Options button top right of the visual. To re-sort the glyphs, you can use the sorting and sort direction buttons on the plot segment toolbar, or you can use the “Order” attribute in the Attributes pane under the Sub-layout group. You can sort by any of the fields listed in the dropdown button, for example, descending by the “Sales” field; see Figure 5-30.
Figure 5-30

The for the glyphs

Once you bind a field to the x-axis, the sorting of the glyphs is restrained by that field. For instance, with the “Year” field bound to the x-axis, you can sort ascending or descending by the “Sales” field for each salesperson within each year (this is what we weren’t able to do in Power BI); see Figure 5-31.
Figure 5-31

Sorting the glyphs within each

If you want to sort by the x-axis labels, for example, by “Year” descending, you can’t do this from the plot segment toolbar despite the field listed on the sorting button because this only sorts within the x-axis categories. You must use the X Axis attribute in the Attributes pane (see the following section).

Tip

If you want to sort an axis by a numerical field, don’t bind a category to the axis. Use a text mark instead to label the categories.

The takeaway from this section on sorting glyphs is to remember that binding a categorical field to either an x- or y-axis will restrain the sorting of the glyphs to within the categories.

Sorting the Axis Labels

To sort the labels on the x-axis, for example, by the “Year” field, you will need to use the Order By attribute of the plot segment. Click the sort button to the right of the attribute, and in the sorting dialog that opens, you can reverse the sort, and also note that you can drag and drop the items in the list to create a custom sort; see Figure 5-32.
Figure 5-32

Sorting the axis labels

To produce custom sorting on x- or y-axes labels in a Power BI chart requires using a “sort column” in the underlying data and therefore, hopefully you’re thinking that this is a lot easier.

Spacing Glyphs and Labels

With regard to spacing out elements in your chart, again we can compare the limited choice in Power BI to the richer selection of options in Charticulator.

Spacing in a Power BI Chart

In Power BI, the only option available is the “Inner padding” formatting option on the X Axis formatting card; see Figure 5-33.
Figure 5-33

Power BI “Inner padding” option only changes the space between axis labels

This only allows you to change the spacing between the x-axis labels, not between the columns.

Spacing in a Charticulator Chart

However, in Charticulator, we have a lot more control over the spacing of the elements. The spacing options are similar to the sorting options in that there are two different spaces that you might want to change: the gap between the axis labels and the gap between glyphs.

Spacing the Glyphs

To change the gap between the glyphs, use the “Gap” attribute under the Sub-layout group; see Figure 5-34.
Figure 5-34

Spacing the

You can also just drag between glyphs to change the gap.

Spacing the Axis Labels

To do this, use the “Gap” attribute under X Axis: Categorical of the plot segment. Alternatively, you can simply drag between the categories in the chart; see Figure 5-35.
Figure 5-35

Spacing the

We’ve been concentrating on using these sorting and spacing options with a Stack X sub-layout but they are also applicable to any sub-layout.

Aligning the Glyphs

You can change the alignment of the glyphs by using the alignment options on the plot segment toolbar or under the Sub-layout attributes of the plot segment; see Figure 5-36.
Figure 5-36

Aligning the glyphs

However, at the time of writing, if you align your glyphs at the top of the plot segment and you have a legend on the left, you are not able to invert the scale on the legend as you can in Power BI.

Axis Visibility and Position

The Visibility & Position group of attributes permits exciting design alternatives to conventional axis labels. You can hide the axis or position the axis above or on the right of the plot segment. You can also offset the axis labels away from the axis itself. Using a negative number will move the labels inwards. If you do this, the labels may lurk behind the glyphs, so we are given an “On Top” attribute as well.
Figure 5-37

Changing the position of the axis labels

In Figure 5-37, we have moved the labels to the opposite side and offset the labels by –40. Notice also that the Line Color attribute has been changed to no color (select “none” in the color palette).

Once you have bound data to the X or Y Axis attribute, you can also hide the labels using the Visible attribute. Doing this allows you to control which “labels” show on the axes. For instance, in the example in Figure 5-38, I’ve bound the “Year” field to the X Axis attribute of the plot segment because I needed to categorize the glyphs accordingly, and I used the Fill attribute to color them by year. I then bound the “Salesperson” field to a text mark and anchored it to the bottom of the glyph. I checked off the Visible attribute to remove the labels for the “Year” field because I only wanted to see the text marks for the salespeople.
Figure 5-38

 and using a text mark instead

Using text marks in this way to label the axis categories gives you great flexibility in how data on the axis is displayed.

Formatting Axis Labels and Tick Lines

This brings us now to look at the formatting attributes of the plot segment.

Note

Formatting options that are specific to a numerical axis will be covered in Chapter 7.

Remember that the formatting of the glyphs depends on the attributes of the mark, symbol, or line that comprises the glyph. The elements that you can format in the plot segment are the axis labels and the tick marks, and you will find these attributes under the Style group of attributes; see Figure 5-39.
Figure 5-39

Formatting the axis labels and tick marks

As an example of how you could format the axis style, I have changed the line color to red, hid Tick Line, changed the label color to green, and increased the Font Size.

Gridlines

Gridlines are often associated with a numerical axis. As we have seen in Chapter 4 when we created a line chart, you need to bind a numerical field to either the X or Y Axis attribute of the plot segment to create a numerical axis and should also use a symbol in the Glyph pane. You can then use the Gridline attributes of either the x- or y-axis as shown in Figure 5-40 where we have added gridlines to the y-axis.
Figure 5-40

Gridlines on the y-axis

If you have a numerical x-axis, for example, in a bar type chart, you can also display vertical gridlines which can help clarify the data.

Hands-On with Plot Segment Attributes

Being able to successfully apply the attributes of the plot segment means that you are moving forward in understanding Charticulator and you can now start to reap the benefits of using this software. To prove this is the case, it would be great if you could employ your newly found skills in using Charticulator to build three different charts, some hands-on practice if you like. In Figure 5-41, using your own data, why don’t you see if you can build similar charts that all require the use of the plot segment’s attributes?
Figure 5-41

Chart #1

Chart

 #2

Chart

 #3

How well did you do? I’m sure your charts are looking great. If not, in Table 5-1, I have listed which attributes were used in each chart using my example data.
Table 5-1

How the charts in Figure 5-41 were designed

Chart #1

Chart #2

Chart #3

• Ellipse Shape in Glyph pane

• Stack Y

• Salespeople bound to Y Axis

• Sales bound to Width

• Salespeople bound to Fill

• Text mark for Year

• Text mark Anchor X=Left and Anchor Y=Middle

• Align Middle vertically

• Ellipse Shape in Glyph pane

• Stack Y

• Year bound to X Axis

• Sales bound to Height

• Salespeople bound to Fill

• Text mark for Sales

• Text mark Anchor Y=Middle

• Align top vertically

• Move Axis to opposite

• Insert legend for Salespeople

• Line and symbol in Glyph pane

• Stack Y

• Year bound to X Axis

• Sales bound to Y Span of Line

• Salespeople bound to Stroke of line and Fill of symbol

• Increase Line Width

• Sales bound to Size of symbol

• Sort by Sales

• Insert Link line for Salespeople

• Format Bezier link line

• Insert legend for Salespeople

You may think that the preceding charts are eye-catching and buck the trend of traditional charts, but to be quite honest with you, up to now most of our charts have been at best conventional and at worst plain dull, at least as far as Charticulator is concerned. We’re still stuck using a single categorical axis. What we have yet to explore is one of the great advantages of creating charts in Charticulator, and that is the ability to use two categorical axes and no value axis. Like the idea of this? Then you’ll need to move on to the next chapter.

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

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