title: Add a subclass in d3 chart hierarchy
body: <p>I was trying to add small triangle below tooltip and above bar.</p>
  <p>For that I was following this document -
  <a href="http://bl.ocks.org/caged/6476579" rel="nofollow noreferrer">http://bl.ocks.org/caged/6476579</a></p>
  <p>For tooltip , I have written below code -</p>
  <pre><code>var tip = d3Tip()
    .attr(&quot;class&quot;, &quot;d3-tip&quot;)
    .style(&quot;line-height&quot;, 1)
    .style(&quot;font-weight&quot;, &quot;bold&quot;)
    .style(&quot;padding&quot;, &quot;12px&quot;)
    .style(&quot;background&quot;, &quot;rgba(0, 0, 0, 0.8)&quot;)
    .style(&quot;color&quot;, &quot;#fff&quot;)
    .style(&quot;border-radius&quot;, &quot;2px&quot;)
    .attr(&quot;class&quot;, &quot;:after&quot;)
    .style(&quot;box-sizing&quot;, &quot;border-box&quot;)
    .style(&quot;display&quot;, &quot;inline&quot;)
    .style(&quot;font-size&quot;, &quot;10px&quot;)
    .style(&quot;width&quot;, &quot;100%&quot;)
    .style(&quot;color&quot;, &quot;rgba(0, 0, 0, 0.8)&quot;)
    .style(&quot;content&quot;, &quot;\\25BC&quot;)
    .style(&quot;position&quot;, &quot;absolute&quot;)
    .style(&quot;text-align&quot;, &quot;center&quot;)
    .offset([-10, 0])
    .html(function (_data, indexedData) {
      var htmlToolTip = &quot;&quot;;
      keys.map((key, index) =&gt; {
        htmlToolTip +=
          &quot;&lt;strong&gt;&quot; +
          key +
          &quot; : &lt;/strong&gt; &lt;span style='color:red'&gt;&quot; +
          indexedData.data[key + &quot;Value&quot;] +
          &quot;&lt;/span&gt; &lt;br&gt;&quot;;
      });
      return htmlToolTip;
    });
  </code></pre>
  <p>Here , I am trying to add below class properties-</p>
  <p>/* Creates a small triangle extender for the tooltip */</p>
  <pre><code>.d3-tip:after {
    box-sizing: border-box;
    display: inline;
    font-size: 10px;
    width: 100%;
    line-height: 1;
    color: rgba(0, 0, 0, 0.8);
    content: &quot;\25BC&quot;;
    position: absolute;
    text-align: center;
  }
  </code></pre>
  <p>But triangle not getting added below tooltip.</p>