答案 0 :(得分:2)
在数据集选项中将填充属性设置为false
<div id="parent">
<p>read me read me read me</p>
<div class="ignore-me">and thus ignore this text</div>
<p>read me read me read me</p>
<script class="ignore-me"></script>
<p>read me read me read me</p>
<link class="ignore-me">
</div>
<button id="Bt-Copy">copy to clipboard (except red part)</button>
您可以参考这个小提琴: https://jsfiddle.net/red_stapler/u5aanta8/1/
还参考图表Js Docs https://www.chartjs.org/docs/latest/charts/line.html