Pareto Chart

In this tutorial, we’ll demonstrate how to draw a Pareto Chart in Glimpse to visualize the number of titanium investment casting defects in the production process. Pareto Charts are useful in quality control to help identify what factors are contributing the most problems to a process and which factors are trivial and not worth spending time on.

First, add in the data from the table below:

Defect Frequency
Shrink 64
Porosity 14
Weld LOF 8
Shell inclusion 7
Hard alpha inclusion 5
Tungsten inclusion 2

Then, under Visual > Mark in the Inspector panel, set the Mark Type to Bar.


Drag the field Defect into the X encoding and deactivate Title in the Inspector panel.


Then, drag in again the Frequency field into the Y encoding.


The y-axis needs to be set from 0-100, so in the Inspector panel under Visual > Encoding > Scale > Domain > Values press the + button and change the type to Number. Press the + button again and enter 100.


After, drag the field Defect into the Color encoding and deactivate Legend in the Inspector panel.


To draw the cumulative percentage curve, first, we need to create a few data transforms. On the top menu go Insert > Transform > Window. In the Inspector panel, enter “TotalFrequency” into Title, under the window dropdown menus, select Sum, Frequency, and enter “TotalFrequency”. In Frame, enter -99 in Start, 99 in End, and tick Ignore Peers. After, make sure to activate the transform.


To create the next transform, go Insert > Transform > Calculate. Enter “PercentOfTotalFrequency” in the Title and Output, and in Calculate write the equation:

datum['Frequency'] / datum['TotalFrequency']

Then activate the transform.


Add in the final transform from Insert > Transform > Window and enter “SumOfPercentOfTotalFrequency” in the Title. Under Window select Sum, PercentOfTotalFrequency, and enter “SumOfPercentOfTotalFrequency”. Then activate the transform.


To add in the curve layer, go Insert > Layer > Line.


Drag the field Defect into the X encoding and the transform generated field SumOfPercentOfTotalFrequency into the Y encoding and change its Measure type to Quantitative.


We’ll fix the line in a bit, but first go Visual > Mark and set the Color to black. Also, activate Point Overlay and under there change the Color to black.


To adjust the line, there needs to be another y-axis on the right side. To do this, select Group under Layers in the Outline. Then in the Inspector panel go Document > Info > Layout > Shared Scale > Scale Resoultion > Y and select the image12 button.


All that’s left now is to adjust the right y-axis. Select the Line layer and the SumOfPercentOfTotalFrequency field in the Y encoding. Under Title type in “Cumulative Percentage”.


Convert the axis labels into percentages by going Visual > Encoding > Axis > Labels > Formating and set the Format As to Number. Then in Template select 12%.


This concludes this tutorial on drawing a Pareto Chart. If you want to further customize your chart, please read the documentation.