unslopkit

Components / Tooltips and popovers

Line chart crosshair

A crosshair that follows the hour you point at on a two line chart, with a dot on each line and a tip that names both values and the gap.

Loaves sold per hour
  • Today
  • Last Saturday
  1. 7:00 to 8:00Today12Last Sat102 more than last week
  2. 8:00 to 9:00Today31Last Sat265 more than last week
  3. 9:00 to 10:00Today44Last Sat359 more than last week
  4. 10:00 to 11:00Today38Last Sat413 fewer than last week
  5. 11:00 to 12:00Today52Last Sat4012 more than last week
  6. 12:00 to 13:00Today47Last Sat3611 more than last week
  7. 13:00 to 14:00Today29Last Sat301 fewer than last week
  8. 14:00 to 15:00Today18Last Sat224 fewer than last week
Drawn in your kit, Plain.Change the look

The code

Plain HTML and CSS on your kit's variables. Put it next to tokens/variables.css from your kit's files and it draws in your look.

<div class="ukc-tooltip-line-crosshair">
<figure class="chart">
  <figcaption>
    <span class="ttl">Loaves sold per hour</span>
    <ul class="key"><li><i class="sw"></i>Today</li><li><i class="sw dash"></i>Last Saturday</li></ul>
  </figcaption>
  <div class="area">
    <svg viewBox="0 0 300 120" preserveAspectRatio="none" fill="none" aria-hidden="true"><path class="gl" d="M0 10h300M0 60h300M0 110h300"/><polyline class="lb" points="18.75,93.3 56.25,66.7 93.75,51.7 131.25,41.7 168.75,43.3 206.25,50 243.75,60 281.25,73.3"/><polyline class="la" points="18.75,90 56.25,58.3 93.75,36.7 131.25,46.7 168.75,23.3 206.25,31.7 243.75,61.7 281.25,80"/></svg>
    <ol class="pts">
      <li class="pt lead" style="--a: 75.0%; --b: 77.8%"><button type="button" class="col" aria-label="7:00 to 8:00" aria-describedby="ukc-tooltip-line-crosshair-7"><span class="plot"><span class="rule"></span><span class="dot a"></span><span class="dot b"></span></span><span class="h">7</span></button><span class="tip" role="tooltip" id="ukc-tooltip-line-crosshair-7"><span class="hr">7:00 to 8:00</span><span class="ln"><i class="sw"></i>Today<b>12</b></span><span class="ln"><i class="sw dash"></i>Last Sat<b>10</b></span><span class="dl">2 more than last week</span></span></li>
      <li class="pt lead" style="--a: 48.6%; --b: 55.6%"><button type="button" class="col" aria-label="8:00 to 9:00" aria-describedby="ukc-tooltip-line-crosshair-8"><span class="plot"><span class="rule"></span><span class="dot a"></span><span class="dot b"></span></span><span class="h">8</span></button><span class="tip" role="tooltip" id="ukc-tooltip-line-crosshair-8"><span class="hr">8:00 to 9:00</span><span class="ln"><i class="sw"></i>Today<b>31</b></span><span class="ln"><i class="sw dash"></i>Last Sat<b>26</b></span><span class="dl">5 more than last week</span></span></li>
      <li class="pt" style="--a: 30.6%; --b: 43.1%"><button type="button" class="col" aria-label="9:00 to 10:00" aria-describedby="ukc-tooltip-line-crosshair-9"><span class="plot"><span class="rule"></span><span class="dot a"></span><span class="dot b"></span></span><span class="h">9</span></button><span class="tip" role="tooltip" id="ukc-tooltip-line-crosshair-9"><span class="hr">9:00 to 10:00</span><span class="ln"><i class="sw"></i>Today<b>44</b></span><span class="ln"><i class="sw dash"></i>Last Sat<b>35</b></span><span class="dl">9 more than last week</span></span></li>
      <li class="pt" style="--a: 38.9%; --b: 34.8%"><button type="button" class="col" aria-label="10:00 to 11:00" aria-describedby="ukc-tooltip-line-crosshair-10"><span class="plot"><span class="rule"></span><span class="dot a"></span><span class="dot b"></span></span><span class="h">10</span></button><span class="tip" role="tooltip" id="ukc-tooltip-line-crosshair-10"><span class="hr">10:00 to 11:00</span><span class="ln"><i class="sw"></i>Today<b>38</b></span><span class="ln"><i class="sw dash"></i>Last Sat<b>41</b></span><span class="dl">3 fewer than last week</span></span></li>
      <li class="pt show" style="--a: 19.4%; --b: 36.1%"><button type="button" class="col" aria-label="11:00 to 12:00" aria-describedby="ukc-tooltip-line-crosshair-11"><span class="plot"><span class="rule"></span><span class="dot a"></span><span class="dot b"></span></span><span class="h">11</span></button><span class="tip" role="tooltip" id="ukc-tooltip-line-crosshair-11"><span class="hr">11:00 to 12:00</span><span class="ln"><i class="sw"></i>Today<b>52</b></span><span class="ln"><i class="sw dash"></i>Last Sat<b>40</b></span><span class="dl">12 more than last week</span></span></li>
      <li class="pt" style="--a: 26.4%; --b: 41.7%"><button type="button" class="col" aria-label="12:00 to 13:00" aria-describedby="ukc-tooltip-line-crosshair-12"><span class="plot"><span class="rule"></span><span class="dot a"></span><span class="dot b"></span></span><span class="h">12</span></button><span class="tip" role="tooltip" id="ukc-tooltip-line-crosshair-12"><span class="hr">12:00 to 13:00</span><span class="ln"><i class="sw"></i>Today<b>47</b></span><span class="ln"><i class="sw dash"></i>Last Sat<b>36</b></span><span class="dl">11 more than last week</span></span></li>
      <li class="pt tail" style="--a: 51.4%; --b: 50.0%"><button type="button" class="col" aria-label="13:00 to 14:00" aria-describedby="ukc-tooltip-line-crosshair-13"><span class="plot"><span class="rule"></span><span class="dot a"></span><span class="dot b"></span></span><span class="h">13</span></button><span class="tip" role="tooltip" id="ukc-tooltip-line-crosshair-13"><span class="hr">13:00 to 14:00</span><span class="ln"><i class="sw"></i>Today<b>29</b></span><span class="ln"><i class="sw dash"></i>Last Sat<b>30</b></span><span class="dl">1 fewer than last week</span></span></li>
      <li class="pt tail" style="--a: 66.7%; --b: 61.1%"><button type="button" class="col" aria-label="14:00 to 15:00" aria-describedby="ukc-tooltip-line-crosshair-14"><span class="plot"><span class="rule"></span><span class="dot a"></span><span class="dot b"></span></span><span class="h">14</span></button><span class="tip" role="tooltip" id="ukc-tooltip-line-crosshair-14"><span class="hr">14:00 to 15:00</span><span class="ln"><i class="sw"></i>Today<b>18</b></span><span class="ln"><i class="sw dash"></i>Last Sat<b>22</b></span><span class="dl">4 fewer than last week</span></span></li>
    </ol>
  </div>
</figure>
</div>

More tooltips and popovers

All 26
  • Low Tide, mix v3

    4:12 · 24 bit WAV

    Share

    Share this mix

    Who can listen

    Link stops working on 12 December

    Share popover

  • Link preview card

  • Lane rates per mile, week 48
    LaneFuelRate
    Reno to Boise$0.42$2.10
    Reno to Fresno$0.42Ines Cabral Tue 24 NovUp 30 cents. Chain controls on Donner Pass add about two hours each way.
    Reno to Salt Lake$0.47Marek Dvorak Mon 23 NovHeld flat. Two carriers still want backhauls out of Utah.
    Reno to Portland$0.44$2.30

    Cell note

    1. Tove Lindahl 06:02

      High water is 6:10 on Saturday. Slip by 5:45?

    2. Ravi Nair 06:05

      I have the launch key. Who took the cox box home after Tuesday?

    Message hover actions

    1. 0:00 to 2:14WrenClose by, in the bramble at the gate
    2. 2:14 to 3:50BlackbirdLoud on the left, top of the alder
    3. 3:50 to 5:30Reed warblerChattering low in the reeds
    4. 5:30 to 6:40CuckooFar off, across the water

    Dawn chorus, Holme Marsh

    1:07 / 6:40 · 3 May, 04:52

    Scrubber preview

  • Payment terms

    The share of each payment the client holds back until the final walkthrough. of 10% is kept from every progress claim on this job and paid out once the client signs off the last inspection.

    Definition term