             .renderHorizontalGridLines true
             .symbolSize CHART_LAYOUT_PARAMS.symbolSize
             .symbol CHART_LAYOUT_PARAMS.subjectChartSymbol
-            # TODO - What is category 10?
+            # Construct a new scale with a range of ten categorical colors.
             .colors d3.scale.category10()
-            # TODO - What is d here? Why key 1?
-            .colorAccessor (d) -> d.key[1]
+            # The symbol color is based on the data object's key 1 value, which
+            # is the session number.
+            .colorAccessor (obj) -> obj.key[1]
             .xAxisLabel "Patient"
             .yAxisLabel "Visit"
             .elasticX true

            yAxis = axes[i].y

            # Set up the dimension based on the X and Y axis user selections.
            # TODO - is d here the chart data object? If so, then comment and
            # rename to obj here and below.
            dim = xFilter.dimension (d) ->
              [
                d[xAxis]
                d[yAxis]
              ]

            # The chart group.

          # Pad the left margins.
          chart.margins().left += CHART_LAYOUT_PARAMS.leftMargin
          
          # Apply a renderlet and associate it with tooltip callbacks.
          chart.on 'renderlet', (chart) ->
            chart.selectAll '.symbol'
              .on 'mouseover', (obj) ->
                # Supply the tooltips. The tooltip element is the selection
                # returned by d3 after the chart rendering call.
                tooltip.transition().duration(20).style('opacity', .9)
                # TODO - make temp variables and interpolate the argument,
                #   e.g.:
                #     label = "<strong>Patient:</strong>#{ obj.key[0] }"
                #     ...
                #     html = "#{ label }..."
                #     tooltip.html(html)
                tooltip.html('<strong>Patient:</strong> ' + obj.key[0] + '<br/><strong>Visit:</strong> ' + obj.key[1]).style('left', d3.event.pageX + 5 + 'px').style 'top', d3.event.pageY - 35 + 'px'
              .on 'mouseout', (obj) ->
                tooltip.transition().duration(50).style('opacity', 0)

          # The axes determine the number of charts to display.
