score:0

i have used css toggle to achieve show more/less. here i used div and p tags, but for best result you have to use ul li (list tags). also there has to be unique id which you can take from, point attr of highcharts

<input type="checkbox" class="read-more-state" id="post-2" />
<label for="post-2" class="read-more-trigger"></label>

here tooltip does not expands but scrollbar appears

fiddle demo

var chart = new highcharts.chart({

  chart: {
    renderto: 'container',
  },
  tooltip: {
    backgroundcolor: "rgba(255,255,255,0)",
    borderwidth: 0,
    shadow: false,
    usehtml: true,
    formatter: function() {
      full_lengthst = `lorem ipsum is simply dummy text of the printing and typesetting industry. lorem ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. it has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. it was popularised in the 1960s with the release of letraset sheets containing lorem ipsum passages, and more recently with desktop publishing software like aldus pagemaker including versions of lorem ipsum.`
      string = "";
      if (full_lengthst.length > 100) {
        string += '<div class="read-more-wrap"><p>' + full_lengthst.substr(0, 100) + '</p>';
        string += '<p class="read-more-target">' + full_lengthst.substr(100, full_lengthst.length - 1) + '</p></div>  <label for="post-2" class="read-more-trigger"></label>'
      } else {
        string += '<div class="read-more-wrap"><p>' + full_lengthst + '</p></div>'
      }
      return `<div class="mycharttooltip">
  <input type="checkbox" class="read-more-state" id="post-2" />
  ` + string + `</div>`;
    }
  },

  series: [{
    data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
  }]

});
.highcharts-container {
  overflow: visible !important;
}

.read-more-state {
  display: none;
}

.read-more-target {
  opacity: 0;
  max-height: 0;
  font-size: 0;
  transition: .25s ease;
}

.read-more-state:checked~.read-more-wrap .read-more-target {
  opacity: 1;
  font-size: inherit;
  max-height: 999em;
}

.read-more-state~.read-more-trigger:before {
  content: 'show more';
}

.read-more-state:checked~.read-more-trigger:before {
  content: 'show less';
}

.read-more-trigger {
  cursor: pointer;
  display: inline-block;
  padding: 0 .5em;
  color: #666;
  font-size: .9em;
  line-height: 2;
  border: 1px solid #ddd;
  border-radius: .25em;
}

.mycharttooltip {
  position: relative;
  z-index: 50;
  border: 2px solid rgb(0, 108, 169);
  border-radius: 5px;
  background-color: #ffffff;
  padding: 5px;
  font-size: 9pt;
  overflow: auto;
  height: 50px;
  width: 100px
}

.highcharts-tooltip {
  pointer-events: all !important;
}
<script type="text/javascript" src="https://code.highcharts.com/highcharts.src.js">
</script>
<div id="container" style="height: 300px"></div>


Related Query