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

1. Introduction to Charticulator

Alison Box1  
(1)
Billingshurst, West Sussex, UK
 

With Charticulator’s recent (April 2021) integration into Power BI, you can now build customized charts, graphs, and data visualizations right inside Power BI. In the most fundamental of terms, Charticulator has a simple interface that hides a complex methodology under the hood.

Its greatest value is its immense power to generate a whole host of different visuals and graphics. The challenge is that there is a myriad of settings and options that can be combined in what appears to be limitless confusing combinations, making it intimidating to many. Unlike other custom Power BI visuals, Charticulator runs in a separate application window within Power BI with its own user interface, and therefore it requires a completely different set of interactions and associated knowledge.

In this chapter, we are going to get started with Charticulator. We will begin by importing Charticulator into Power BI; we’ll create a simple chart and take a tour of the Charticulator screen. Before we begin however, I want you to forget everything you think you know about creating charts and visuals where you are constrained by the limits of what you can plot on an x- or y-axis or the number of categories that you can use. Instead, think in terms of designing a representation of your data from scratch, where you are no longer restrained by your choice of visual.

Importing Charticulator in Power BI

The first step is to import Charticulator into Power BI as a custom visual. You then need to ensure that it’s available in all Power BI reports you generate or edit. To import Charticulator into Power BI, in Power BI Desktop click the ellipsis at the bottom of the Visualizations gallery and click Get more visuals as shown in Figure 1-1. This will take you to the Microsoft Power BI Visuals App Store.
Figure 1-1

Accessing the App Store

In the App Store, use the Search box top right of the dialog to search for Charticulator and then click the Charticulator tile as shown in Figure 1-2.
Figure 1-2

Select the Charticulator custom visual in the App Store

A window opens detailing the Charticulator custom visual. Click Get it Now, and when the visual has been successfully imported into your Power BI Desktop report, you’ll see the dialog in Figure 1-3.
Figure 1-3

Charticulator has been successfully imported

To ensure that Charticulator is available in all new reports, right-click on the Charticulator icon in the Visualizations gallery and click Pin to visualizations pane as shown in Figure 1-4.
Figure 1-4

Pinning Charticulator to the Visualizations gallery

Now that you have successfully imported Charticulator into Power BI, let’s move on to create a chart.

Create a Charticulator Chart

With Charticulator safely installed in Power BI, you can now start designing stunning visuals. In Figure 1-5, you can see to what I’m alluding. In the following chapters, these are the varieties of charts and visualizations that you will learn to build.
Figure 1-5

Examples of visualizations created in Charticulator

But here’s the heads-up. You’ll quickly learn to build some of these visuals, but as for the others, it won’t be until you’ve progressed through to the final chapters of this book that you’ll have discovered the secrets behind those, but it will be well worth the effort. When I first started using Charticulator, I thought it was like trying to rein in a willful child. I would think my commands to the software were clear, but it would be doing the contrary, and I would think, what on earth is going on here? You will see what I mean when you try using Charticulator for yourself. It takes time to understand this wayward piece of software, but it is worth the investment and the return is high. Stick with it and you too will soon be designing innovative visuals.

That’s the end of my lecture! It’s time to get to work. Let’s start out by creating a very simple and unspectacular clustered column chart as shown in Figure 1-6.
Figure 1-6

Your first Charticulator chart

I know you’re thinking, but I could easily create this chart in Power BI so why would I want to use Charticulator? I take your point, but remember what we said earlier, that Charticulator has a challenging methodology to get to grips with. However, if you start by creating a chart you can easily produce elsewhere, it’ll give you some context on which to hang your hat, and then you’ll be ready to move on and explore the more challenging concepts that underpin Charticulator.

If you want to follow along and create a similar chart yourself, all you need are three fields from your data model, two categorical fields and one numerical field, for example, we’re using “Year,” “Salespeople,” and “Sales.” The numerical field can be a numerical column or an explicit measure.

Now let’s fire up Charticulator! First, click the Charticulator icon in the Visualizations gallery to generate a placeholder for the visual on the Power BI canvas.

Selecting the Data

Drag all the fields you want to use in your chart from the Fields pane in Power BI into the Data bucket of the Visualizations pane as shown in Figure 1-7.
Figure 1-7

Charticulator placeholder with fields in the Data bucket

You may feel that putting all your fields into a single bucket is a rather odd thing to do, and certainly this got me puzzled too when I was new to Charticulator. In Power BI chart visuals, shouldn’t there always be a “Values” bucket for numerical fields alongside buckets such as “Axis” and “Legend” for categorical fields? You can see an example of this in Figure 1-8 that shows the Power BI visual that plots the same data.
Figure 1-8

Power BI visual with “categorical” and “values” buckets

After all, don’t all Power BI visuals group and then aggregate data? In Charticulator, there is no concept of constraining fields to behave as a “value” or a “category.” However, if this is the case, how does Charticulator know which fields are to be plotted as values and which are to categorize the data? This question will be answered when we look at Charticulator’s Fields pane (see the section on “The Fields Pane” below).

Opening Charticulator

Let’s get back to creating the chart. In the Charticulator placeholder, click the More Options button at the top right of the visual and select Edit as shown in Figure 1-9.
Figure 1-9

The Edit option on the Options button

The Charticulator placeholder will expand to fill the Power BI canvas. Click the Create chart button, and this will open Charticulator as shown in Figure 1-10.
Figure 1-10

The Charticulator screen

Designing the Chart

Now that we’ve got Charticulator open, we can start to construct the chart as shown in Figure 1-6.

Note

The purpose of this exercise is for you to have a Charticulator chart up and running quickly so that we can use it as the basis for the examples that follow. Because your knowledge of Charticulator is as yet limited, I’ll be keeping explanations to a minimum, appreciating that at this stage you probably won’t understand how it all works. Don’t worry, everything will be explained over the next few chapters and beyond.

Before we start piecing the chart together, just ensure the fields that will categorize your data don’t have a sigma beside their name in the Fields pane (more on this later, see the section on “The Fields Pane” below). For instance, in our data the “Year” field needs to be changed to categorical. To do this, click the sigma and select categorical, as shown in Figure 1-11.
Figure 1-11

Changing a numerical field to a categorical field

The first step in designing any Charticulator chart is rendering the glyph. The glyph is the visual representation of your data in the chart. In our chart, the glyph will be a simple rectangle shape that represents the columns of the clustered column chart.

From the toolbar at the top, start by clicking the Marks button that shows a rectangle shape. You can then drag and drop the rectangle into the Glyph pane as shown in Figure 1-12. Note how the area into which you can drop the mark is highlighted in orange.
Figure 1-12

Dragging the mark into the Glyph pane

On the chart canvas, you will now see a rectangle for every combination of category; see Figure 1-13.
Figure 1-13

Glyphs are repeated on the chart canvas for every category

To categorize the rectangles on the x-axis, drag a categorical field from the Fields pane onto the x-axis in the chart canvas. The x-axis will highlight in orange when you’re ready to drop the field. For example, we’ve dragged the “Year” field onto the x-axis, and the rectangles are categorized into years; see Figure 1-14.
Figure 1-14

Drag and drop a category onto the x-axis

At this point, the rectangles on the chart canvas are all the same height, but their heights should reflect the values in the numerical field. Drag your numerical field, for example, the “Sales” field, from the Fields pane onto the rectangle in the Glyph pane, dropping it where it shows the “HEIGHT” line as shown in Figure 1-15. Notice again that the orange highlight indicates where you need to drop the field. The height of the rectangles now reflects the sales values.
Figure 1-15

Drag a numerical field onto the HEIGHT of the rectangle

Each rectangle on the canvas represents a subcategory. For example, in our chart, each rectangle represents a salesperson in each year. We need to color the rectangles accordingly. To do this, make sure you have clicked the rectangle in the Glyph pane. In the Attributes pane at the bottom of the screen, you will find a “Fill” attribute, under the Style group (you may need to scroll down the pane). Drag and drop your category, “Salespeople” in our case, into this attribute; see Figure 1-16.
Figure 1-16

Attributing a color to each rectangle on the chart canvas

The last step in generating our clustered column chart is to add a “value” axis on the left of the chart so we can understand the numerical values being plotted. To create the y-axis scale, you need to insert a legend. I know it sounds bizarre that a numerical y-axis is referred to as a “legend” but just stick with it for now. We’ll be exploring Charticulator’s legends in more detail in later chapters.

Click the Legend button on the top toolbar; select your numerical field, for example, “Sales”; and click Create Legend as shown in Figure 1-17. Don’t worry if the legend spills off the canvas. We can adjust this when we explore the chart canvas in our tour around the screen (see below).
Figure 1-17

Inserting Charticulator legends

You can also use this method to create a legend to explain category colors, for example, a legend for the “Salespeople” field, and this will be placed top right of the chart.

Saving the Chart in Power BI

Now click the Save button top left of Charticulator’s screen and click Back to Report at the very top left of the screen.

Congratulations! You have just created your very first Charticulator chart in Power BI. I hope it’s very similar to the one shown in Figure 1-18.
Figure 1-18

Your first Charticulator chart in Power BI

Tour of the Charticulator Screen

Now that we have a chart up and running inside Charticulator, we can take a trip around each of the panes of the screen, meeting the components that comprise a Charticulator chart. Please understand, however, that we’re only at the very tip of the iceberg of our knowledge. Many of the elements of Charticulator that we encounter now we will revisit in much greater detail in future chapters.

We will start by moving back into Charticulator from Power BI. Use the More Options button of the visual and click Edit.

The Charticulator panes and parts of the screen that we will be exploring are numbered in Figure 1-19 and are as follows:
  1. 1.

    The chart canvas

     
  2. 2.

    The Fields pane

     
  3. 3.

    The Glyph pane

     
  4. 4.

    The Layers pane

     
  5. 5.

    The Attributes panes

     
  6. 6.

    The Scales pane

     
Figure 1-19

The panes of the Charticulator screen

You can now work with the panes in the following ways:
  • Click the pushpin top right of a pane to undock it, and you can then drag on the top edge of a pane to reposition it.

  • Minimize an undocked pane by clicking the minimize button top right. Click again to unminimize.

  • Resize an undocked pane by dragging on the bottom-right corner. You will find being able to enlarge the Glyph pane is a great benefit when you are working with many shapes that comprise the glyph.

However, you can’t undock the Fields pane.

The Chart Canvas

On the left of the screen is the chart itself sitting on the chart canvas. Notice the faint gray lines, known as guides, that define the margin space. We will be looking at using guides in more detail in later chapters, but for now, if you want to change the margin space, drag on one of these guides. Other places where you can drag to manage the canvas are shown in Figure 1-20.
Figure 1-20

Managing the canvas

The rectangle zoom button bottom right of the canvas pane can be used as another means to zoom in. To use the rectangle zoom, simply drag over the area of the canvas you want to zoom in on.

You can also use the Attributes pane of the chart to make these adjustments. See the section on “The Attributes Panes” below.

The Fields Pane

This pane lists the fields you are using or want to use in your chart. If you click the ellipsis top right of the pane, a table pops out that shows the data Charticulator will use in the construction of your chart. An example of this table is shown in Figure 1-21, and you can see that it looks very similar to a Table visual in Power BI. In fact, it often helps to imagine that your Charticulator chart is built on top of a Power BI Table visual.
Figure 1-21

The Fields list showing the table of underlying data

It’s important to understand how Charticulator views the underlying data. Nearly all Power BI chart visuals contain a “Values” bucket where the numerical fields to be aggregated are placed alongside “Axis” and “Legend” buckets that contain fields that group and categorize the data. However, with Charticulator you put all your fields into a single Data bucket. You can see this difference in Figure 1-22.
Figure 1-22

Comparing the buckets in Power BI charts to Charticulator charts

With this in mind, how is Charticulator going to treat the data? It’s not always the case that you want a numerical column to be the “value” and be summarized. For example, you wouldn’t want to sum a field that contains peoples’ ages or indeed sum the year values of our chart. Charticulator will make assumptions about your data, and you can see this from the symbol that sits beside the field name in the Fields pane. A sigma indicates a numerical field type. This can be either a numerical column in your data model or an explicit measure. These will provide the values that will be associated with numerical “attributes” of the chart and glyph (see the section on “The Attributes Panes” below). Text type fields will usually provide the categories but so do some numerical fields. You may recall that when we were creating our clustered column chart earlier, we needed to change the numerical “Year” field, so it behaved as a category. We did this by clicking the sigma in the Fields list; see Figure 1-11. You may need to make similar changes to your fields.

The thing to note here is that with Charticulator, you don’t start by dictating where the field will be placed in the chart, whether it’s on the axis, in the legend, or comprises the values. Instead, you assign it a behavior through the field type. This means that you have the freedom to choose the role a field will play in the chart, change your mind, and try out different permutations. This is what gives Charticulator its great design flexibility.

There are two more field types: ordinal and temporal. You will meet these if you use a field of a date data type or use a Power BI date hierarchy in the Fields pane. You can see in Figure 1-23 that we have used a date field called “SALEDATE” and that “SALEDATE” is a temporal type field. You can also see that you get the dates categorized by “Year,” “Month,” “Month number,” etc. If you view the underlying data, you’ll notice that you have a row for every date and therefore will have a glyph for every date in the chart. You can use the date categories instead, such as “Month” on the chart axes, but there is no ability to drill down from year to month like you can in Power BI. You will find that you don’t need to change fields to the ordinal field type as fields like “Month” will be sorted correctly on clicking Save.
Figure 1-23

Field of a date data type in the Fields pane

If you are using a Power BI date hierarchy, all the members of the hierarchy will have a temporal field type which are best changed to categorical field types. Using just the “Year” member from a date hierarchy will be plotted in the same way as the “Year” categorical field in our example data.

One last thing to note regarding the Fields pane is that the order in which the fields are listed in the Fields pane can be important because it determines the categorization of the data. If you don’t put a categorical field on the x-axis, the first field is taken as the main category, and subsequent fields are subcategories. This is the effect of Power BI’s sort order as shown in the Options button top right of the visual. To change the order, you can use the Options button as usual, or you can simply swap the fields in the Data bucket. You can see this difference in Figure 1-24.
Figure 1-24

The order of the Fields determines the categorization

However, once you have selected your sort order in the Options button, rearranging the fields in the Data bucket will have no effect because the sorting is now determined by the selection in the Options button.

Glyphs and the Glyph Pane

Next up is the Glyph pane where you design your glyph. The glyph that we’re using in our chart is a rectangle shape. In fact, a glyph can comprise a variety of shapes, symbols, lines, and text marks, and we will look at building a more complex glyph in the next chapter. For the moment however, you can think that the glyph is synonymous with the rectangle shape and that will be fine. You can drag the pane around, zoom in, and use the rectangle zoom just as you can on the chart canvas; see Figure 1-25.
Figure 1-25.

The Glyph pane

The glyph in the Glyph pane by default represents the values in the first row of the underlying data. In our chart, this would be the sales for salesperson “Abel” in 2017, and so the rectangle mark is colored blue and sized accordingly, as shown in Figure 1-26.
Figure 1-26

The glyph represents the first row of your data

Consequently, you need to be vigilant if the first row of your data contains very small values in relation to other values or even contains zero. In this scenario, the glyph in the Glyph pane will be so small; it may not even show.

Note

There is an exception to the glyph representing the first row. If you group a field, the glyph will represent the grouped data. We look at grouping data in a later chapter.

However, clicking a glyph in the chart canvas changes the glyph represented in the Glyph pane. For example, clicking the column for salesperson “Charron” in 2017 would change the glyph in the Glyph pane. See Figure 1-27.
Figure 1-27

The glyph represented in the Glyph pane can be changed

On the chart canvas, the glyph is repeated for every row in the underlying data. For example, in our data, we have six salespeople and five years, so we get 30 glyphs in our chart, each representing the sales for each salesperson in each year.

The Layers Pane

The Layers pane lists every element that currently comprises the chart and the glyphs (as we will see, it’s possible to have multiple glyphs). It can contain some or all of the elements listed in Table 1-1, and you can have many of each element in both the chart and the glyph.
Table 1-1

Chart and glyph elements that are listed in the Layers pane

Chart

Glyph

Plot segment

Link

Legend

Text mark

Guide or guide coordinator

Shape

Symbol

Line

Data axis

Icons

Images

Shape (i.e., a mark)

Line

Symbol

Guide or guide coordinator

Text mark

Data axis

Icon

You can see an example of elements listed in the Layers pane in Figure 1-28.
Figure 1-28

The Layers pane

You can hide or delete each element by using the “eye” and “eraser” buttons, respectively.

The order of the elements in the pane is important because it determines the stacking or “Z” order of the elements on the canvas or in the Glyph pane. You can change the “Z” order by dragging and dropping an element to change its position in the list. This is synonymous with “send backward” or “bring forward” that you may have met in other applications.

The Attributes Panes

The Attributes panes list all the attributes of the currently selected Layer. For example, to show the attributes of the rectangle shape sitting in the Glyph pane, select “Shape1” in the Layers pane, and the Attributes pane will show the attributes for “Shape1,” as shown in Figure 1-29. You can also just click on a chart element on the canvas or in the glyph pane to show the attributes for that element.
Figure 1-29

The Attributes pane for the currently selected layer

The rectangle shape, for instance, has attributes such as Height, Width, Length, and Fill color. The chart has attributes such as Dimensions, Margins, and Background. You populate and edit these attributes to render the specific visual you require. This is why we populated the Fill attribute of “Shape1” with the “Salespeople” field to color the rectangles according to each salesperson. We will be looking more closely at the attributes of each chart and glyph element in succeeding chapters.

It’s in the Attributes panes that you can rename elements of the chart listed in the Layers pane. For example, a glyph can comprise multiple marks and symbols with different data associated with each mark or symbol. In this scenario, “Shape1” might be better renamed something like “Rectangle for Sales.” In the Attributes pane for “Shape1”, you can click into the Name attribute and rename accordingly; see Figure 1-30.
Figure 1-30

You can rename chart and glyph elements in the Attributes pane

In fact, you will find that every element of a Charticulator chart can be renamed using the Attributes pane.

The Scales Pane

The Scales pane lists all Charticulator’s scales used by the chart. Scales are usually created for you, and then if required, you will need to create a legend explaining the scale. Scales in Charticulator can be challenging to understand when you’re just starting out, and we will dedicate a whole chapter to learning about them.

The problem is that you may think a scale is something that describes the magnitude of the units being used in a chart. This is not the case with Charticulator’s scales which have a much wider interpretation. In Charticulator, a scale is automatically generated when a field is associated with an attribute of a mark, symbol, or line that comprises the glyph. For example, we have associated the “Sales” field with the Height attribute of the rectangle mark, and this has generated “Scale1” with the “Shape1.Height” property in the Scales pane. We have also associated the “Salespeople” field with the Fill color attribute of the rectangle mark, and this has generated “Scale2” with the “Shape1.Fill” property. Scales would normally have a legend added to the chart to explain the scale. This is why we inserted a legend to show the values associated with the height of the rectangles and a second legend to explain the salespeople’s colors; see Figure 1-31.
Figure 1-31

The Scales pane

We will deep dive into the subject of Charticulator’s scales and legends in Chapter 9.

This completes our tour of the Charticulator screen, and hopefully you’re now conversant with all the different panes and are comfortable finding your way around the user interface. In this chapter, you also created your first Charticulator chart and learned what a glyph is and how the scales in the Scales pane are generated. In the next chapter, we focus on the glyph and take a detailed look at its composition discovering that a glyph can comprise more than just a simple and predictable rectangle shape.

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

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