Graphs in Depth · Part 2

Building Graphs

A graph is a short list of items, each a figure to plot. This guide covers the list of graphs in Settings, what an item can plot, the rules that decide what is drawn, and the codes that sort and narrow a graph.

The list in Settings

Every graph is listed in Tools › Settings, under Graph Settings. This is where a graph is started, and where graphs are put in order, copied and deleted.

Graph NameThe name in the Graph tab's list.
Graph Title, X Axis, Y AxisEach button opens the same settings as a double-click on that part of the graph: see Part 1.
Data TypeWhat a column or point is: see below.
LegendNone, or its place.
Sort Item, Filter, Display CriteriaWhich columns or points are drawn, and in what order: see below.
CustomThe buttons along the bottom of the Graph tab: see below.
ItemsHow many items the graph has. The button beside the number opens the list of them.
The arrowsMove a graph up or down. The Graph tab lists graphs in this order, and opens on the first.
The red bin and the green plusThe bin deletes the graph. The plus adds a new graph below the row; the plus at the top of the list adds one at the end.
Copy and pasteCopy takes a graph's whole definition as a line of text. Paste makes a graph from it, at the end of the list, with the same name: give it a name of its own straight away.

The quickest way to a new graph is to copy the nearest one you have, paste it, rename it, and change its items.

This guide is for Spanner 2.5.1.2 and later. Nothing in Settings changes the Graph tab until you save your settings. If you have changed a graph on the tab, choose Save Graph there first: see Part 1, Saved or not.
The Settings Editor with Graph Settings open at the foot of its list of sections. Ten rows, one for each graph, have a Graph Name, buttons for Title, X Axis and Y Axis, a Data Type, a Legend, a Sort Item, a Filter, Custom, Display Criteria and a count of Items with a button beside it. At the right of each row are arrows, a red bin, a green plus, copy and paste. Four buttons run along the foot of the window
Graph Settings, with the ten graphs Spanner comes with. The number under Items is a count; the small button beside it opens the list.

What a column or point is

The Data Type decides it.

Data TypeA column or point isIt draws
ProductA product.A series for each item that is drawn.
ClassificationA value of the classification chosen on the Graph tab: a brand, a category.A series for each item that is drawn.
PlanogramA planogram.A series for each item that is drawn.
Classification x PlanogramA classification value.One item, as a series for each planogram.
Planogram x ClassificationA planogram.One item, as a series for each classification value.
  • A classification column stands for several products. Each item's Aggregation says how their figures are combined.
  • Planogram x Classification draws a series for every value. With more than 20, Spanner asks before it draws, as the graph takes time and is hard to read. Choose a classification with fewer values.

Items

Click the button beside a graph's Items count. Each row of the list is one item. The green plus at the top adds an item; the arrows, the bin and the plus on a row move it, delete it, and add one below it.

HeaderThe series' name in the legend and the tooltip: see Headers and titles.
CodeWhat the item plots: see Item codes.
AggregationFor a column that stands for several products: Sum, Average, Count, First or Last.
TypeColumn, Row, Line, Scatter, Bubble, Stacked Column or Stacked Row.
AxisX, Y, Y2 (a second scale, on the right), Z (the size of a bubble) or None (an item that only colours points).
GroupA number. Items with the same number are drawn together: see What is drawn.
Number FormatHow the figures are written. N0 is a whole number, N1 has one decimal, P1 is a percentage. A sales measure's code writes them as that measure is written elsewhere. Linear and Area write a length and an area in your units.
ColourThe colour of the column, row, point or line.
Colour OverrideRules that colour points by a figure: see Colouring points.
Point SizeThe size of a scatter's points and a line's markers, and of the largest bubble.
Lines Colour, Lines ThicknessThe outline of a column, row or point; 0 for none. For a Line, the thickness of the line itself: a new item starts at 0.5, which is very thin, so give a line 2 or 3.
Value DisplayValue, or Share for each figure as a share of the series' total. Give a share the Number Format P1.
The Items list of a distribution graph, open under its row in Graph Settings. Ten items are listed. Six are scatters on the Y axis, each a rate of sale such as VALROSW_OU_2_TY. Three are on the X axis: WTD_OU_2_TY, NUM_OU_2_TY and STORES_OU_2_TY. The last, on no axis, has a Colour Override. All ten are in group 1
The ten items of a distribution graph, all in group 1. The first Y item and the first X item are drawn, the other seven of those are spares, and the last item colours the points.

What is drawn

This is the part to understand before building a graph. Items are drawn by group, and in a Product, Classification or Planogram graph each group draws one thing. Spanner takes the first of these that fits the group:

A group withDraws
A Stacked Column or Stacked Row itemAll its Stacked Column items on Y, one on top of the other, or all its Stacked Row items on X.
An item on X and an item on YPoints. The first Y item must be a Scatter, or a Bubble with an item on Z for the size.
An item on Y, and none on XThe first Y item, as a Column or a Line.
An item on Y2, and none on X or YThe first Y2 item, as a Column or a Line against the right-hand scale.
An item on X onlyThe first X item, as a Row.

Four things follow.

  • One series for each group. For two columns side by side, give the two items different group numbers. An item on Y2 needs a group to itself.
  • A second item on the same axis in a group is a spare. It is not drawn, but the user can swap to it, from the Change Items button or the series' right-click menu. This is how the distribution graphs offer six rates of sale.
  • An item on X changes the whole graph. With no item on X, the X axis lists the names of the products, classification values or planograms. An item on X turns it into a scale of numbers, for every group. So keep points in one graph and columns in another. Rows are the same, the other way round.
  • The two "x" data types draw one item. It is the first that is a Column on Y or a Row on X; Planogram x Classification also takes a Stacked Column or Stacked Row. Leave its Header empty, as each series is named after its planogram or classification value.
Ask Spanner AI: "What does each item of this graph do?" It lists them as drawn, spare, or not drawn, with the reason.

Item codes

An item's Code names a figure. It is one of five kinds.

KindExampleNotes
A figure for the selected planogramPlanogram_SelectedLinearSpaceA product's space on the selected planogram. For Product and Classification graphs.
A figure for the comparison planogram, or the changePlanogram_ComparisonLinearSpace
Planogram_ComparisonToSelectedLinearSpaceChange
For Product and Classification graphs.
A figure for each planogramPlanogram_LinearSpaceFor the two "x" data types only. Elsewhere it draws nothing.
A sales figureVALUE_OU_2_TYFor every data type but Planogram.
A property of the product or planogramPositionsCount
BaysCount
Any of its properties that is a number.

Planogram figures

The names are built from three parts: Planogram_, then Selected, Comparison or nothing, then what is measured.

  • What is measured: LinearSpace, AreaSpace, CubicSpace, Facings, Positions, Listings, UnitsStock or Movement.
  • A change is Planogram_ComparisonToSelected, what is measured, then Change. There is none for Movement.
  • On a Planogram graph the planogram's own properties are used: LinearSpace, AvailableSpace, BaysCount, FittingsCount, PositionsCount.

Sales figures

A sales code has four parts, joined by underscores.

MeasureThe code of one of the document's measures. To find a code, look at an item or a report column that already shows the measure, or ask Spanner AI for the list.
OutletOU for the selected planogram's outlet and CH for its channel; COU and CCH for the comparison planogram's; or an outlet's name.
Period1 or 2, the document's two periods.
YearTY for the latest year, YA for the year before.

Calculations

A code with spaces in it is a calculation: figures with a command between each, worked from left to right.

  • The commands are +, -, * and /, or the words Add, Minus, Multiply and Divide. Get may start it.
  • Space for each product: Get Planogram_SelectedLinearSpace / ProductCount
  • Change of space: Get Planogram_SelectedLinearSpace - Planogram_ComparisonLinearSpace
  • On a classification column each figure is totalled over the column's products first, and the totals are then combined. A division is therefore the ratio of the totals, which is what you want.
  • There are no brackets. A calculation takes the figures for the selected and comparison planograms, sales figures and properties. It is not worked out in Planogram or Planogram x Classification graphs.
A code that Spanner can't work out draws zeros, without a message. Check the spelling and the capital letters, and that the document has the measure. Spanner AI can tell you which code is wrong and why: see Part 3.

Headers and titles

An item's Header, and the graph's three titles, can hold words that Spanner fills in from the document. Use them, so that a graph reads correctly in every document.

<SELECTEDPLANOGRAM>, <COMPARISONPLAN>The names of the two planograms.
<OUTLET>The selected planogram's outlet.
<TIME1>, <TIME2>The document's two periods.
<ROWVIEW>The classification chosen on the Graph tab.
A measure's code, as <VALUE>That measure's short description.
A word in square brackets, as [Linear] [Space]The word in the user's language, where Spanner has it.

A typical header is <SELECTEDPLANOGRAM> [Linear] [Space], and for sales <OUTLET> <VALUE> <TIME2>.

Colouring points

A scatter's or a bubble's points can be coloured by a figure, with a legend entry for each colour.

  1. Add an item to the points' group with Axis set to None.
  2. Give it the Code of the figure to colour by.
  3. In Colour Override, type a rule for each colour: a value, a colour and the legend's text, with a space between each.
CodeColour Override
OnSelectedPlanogram
0 or 1
0 Red Not<sp>ranged 1 Green Ranged
OnSelectedAndComparisonIndex
0 on neither planogram, 1 removed, 2 added, 3 kept
0 Gainsboro None 1 Red Removed 2 Green Added 3 Blue Kept
GraphRowViewIndex, with Aggregation FirstRowView: a colour of its own for each classification value.
  • A space inside the legend's text is written <sp>, as a plain space ends the text.
  • A value can be a test: <5, <=5, >5 or >=5. The first rule that fits is used, so put them in order.
  • A colour is a name, such as SteelBlue, or a code such as #FF00E000.
  • Bubbles that share a colour share a size. Colour bubbles by RowView, where each has its own colour, and sizes are true.

Sort, Filter and Display Criteria

Sort Item

EmptyBy name, A to Z.
DescendingBy name, Z to A.
NoneThe document's own order.
A code: Planogram_SelectedLinearSpaceBy that figure, largest first.
A code, then AscendingBy that figure, smallest first.

The code may be a calculation. The two "x" data types sort their columns and their series separately, as Classification=Planogram_LinearSpace Planogram=None: copy the Sort Item of a standard graph of the same type.

Filter

Any of these words, with a space between them:

Product FilterThe graph follows the Product filter.
Planogram FilterThe graph follows the Planogram filter.
Selected PlanogramOnly the products on the selected planogram; in a Planogram graph, only that planogram.
NonZeroA column or point whose figures are all zero is left out.

Most graphs want Product Filter NonZero.

Display Criteria

  • To keep the first or last few, after sorting: Top 20 or Bottom 20.
  • To keep those that pass a test: a code, one of = > < >= <= <>, and a number, with a space between each: PositionsCount > 0.
  • Both together: Top 100 PositionsCount > 0.
  • A sum in a test is written without spaces: WTD_OU_2_TY+Planogram_SelectedPositions > 0.
The settings window of Distribution vs Rate of Sale for Selected Planogram. Filter reads Product Filter NonZero, Sort is empty, and Display Criteria reads WTD_OU_2_TY+Planogram_SelectedPositions+Planogram_ComparisonPositions > 0
The same three settings, as the graph's own window shows them on the Graph tab. This Display Criteria keeps a product that has some distribution, or a place on either planogram.

The buttons

The Custom box lists the buttons a graph has along the bottom of the Graph tab. Type any of these, with a space between them.

CustomButtonGive it to
Linear-AreaSwap Linear & AreaA graph of linear space.
Row-ColumnSwap Row & ColumnA graph of columns or stacked columns.
Value-%Swap Values & PercentageA graph of columns.
Time1-Time2Swap the two periodsA graph of sales figures.
ChangeItemsChange ItemsA graph with spare items: see What is drawn.

The standard column graphs have Linear-Area Row-Column Value-%, and the distribution graphs Time1-Time2 ChangeItems.

When a graph is empty

You seeLook at
Nothing at allThe filters, and whether a planogram is selected. Then the items: does a group have an item that can be drawn, by the table in What is drawn?
One series is missingIts Group. It shares one with an item that is drawn in its place.
Columns of no height, or points in a line along an axisThe Code. It is misspelt, or the document has no such measure, or it is a figure for each planogram in a graph that is not one of the "x" types.
Columns with numbers along the bottom in place of namesAn item on X. It has turned the X axis into a scale.
A graph that works in one document and not anotherThe sales measures. A graph can only plot the measures a document has.

Next: Part 3, Sharing Graphs, and Spanner AI.

Want a graph built for you?

If your graphs don't show what you need, we can build them with you, for your own measures and the way your team works.

Email us Book a Demo