Map Before Drawing

Start with three pinned rows: day and visitors. The mapping is the chart recipe: day goes on the x-axis, visitors goes on the y-axis, and each row becomes one dot. After that mapping, the Tuesday dot reads as 7 visitors because Tue came from the x column and 7 came from the y column.

A tiny chart-construction step: map data columns to x, y, and mark before drawing the plot.

highlighted = computed this step

Start with columns

Start with 3 pinned rows and two columns.

pinned columns\text{pinned columns}
Pinned ColumnsdayvisitorsMon4Tue7Wed5

Map columns to chart roles

Choose the chart roles: day maps to x, visitors maps to y, dot maps to mark.

x, y, mark mapping\text{x, y, mark mapping}
Column-to-Chart Mappingchart roleusesxdayyvisitorsmarkdot

Draw the mapped marks

Draw one dot for each row using the mapped x and y columns.

mapped dots\text{mapped dots}
Visitors by Daydayvisitors024684Mon7Tue5Wed

Read with the mapping

Readout: Tue has 7 visitors because day is x and visitors is y.

read through mapping\text{read through mapping}
Read Through the Mappingitemreadoutx columndayy columnvisitorsmark shapedotreadoutTue has 7 visitors