Menu

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.

image1


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

image2


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

image3


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.

image4


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

image5


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.

image6


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.

image7


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.

image8


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

image9


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.

image10


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.

image11


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.

image13


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”.

image14


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%.

image15


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