title: How to display normalized categories in Altair stacked bar chart tooltip
body: <p>I'm creating a stacked bar chart using the count of a categorical field in a dataframes column.</p>
  <pre><code> chart = alt.Chart(df2).mark_bar().encode(
              x=&quot;take__take:O&quot;,
              y=alt.Y('count(name)', stack=&quot;normalize&quot;, axis=alt.Axis(title=&quot;Percent&quot;, format=&quot;%&quot;)),
              color=alt.Color('name', sort=alt.EncodingSortField('value', order='descending')),
              order=alt.Order(
                  'value',
                  sort=&quot;ascending&quot;
              ),
              tooltip=[
                  alt.Tooltip('count(name)', title=&quot;Total Students&quot;)
              ]
          )
  </code></pre>
  <p>How would I go about getting the normalized count in the tooltip?</p>