<small id='XHi8C'></small><noframes id='XHi8C'>

      <bdo id='XHi8C'></bdo><ul id='XHi8C'></ul>

      1. <i id='XHi8C'><tr id='XHi8C'><dt id='XHi8C'><q id='XHi8C'><span id='XHi8C'><b id='XHi8C'><form id='XHi8C'><ins id='XHi8C'></ins><ul id='XHi8C'></ul><sub id='XHi8C'></sub></form><legend id='XHi8C'></legend><bdo id='XHi8C'><pre id='XHi8C'><center id='XHi8C'></center></pre></bdo></b><th id='XHi8C'></th></span></q></dt></tr></i><div id='XHi8C'><tfoot id='XHi8C'></tfoot><dl id='XHi8C'><fieldset id='XHi8C'></fieldset></dl></div>
      2. <legend id='XHi8C'><style id='XHi8C'><dir id='XHi8C'><q id='XHi8C'></q></dir></style></legend>
        <tfoot id='XHi8C'></tfoot>

        使用 Chart.js,如何避免工具提示重叠?

        时间:2023-11-01

            <legend id='Okv3W'><style id='Okv3W'><dir id='Okv3W'><q id='Okv3W'></q></dir></style></legend>

              <small id='Okv3W'></small><noframes id='Okv3W'>

              • <bdo id='Okv3W'></bdo><ul id='Okv3W'></ul>
                    <tbody id='Okv3W'></tbody>

                  <i id='Okv3W'><tr id='Okv3W'><dt id='Okv3W'><q id='Okv3W'><span id='Okv3W'><b id='Okv3W'><form id='Okv3W'><ins id='Okv3W'></ins><ul id='Okv3W'></ul><sub id='Okv3W'></sub></form><legend id='Okv3W'></legend><bdo id='Okv3W'><pre id='Okv3W'><center id='Okv3W'></center></pre></bdo></b><th id='Okv3W'></th></span></q></dt></tr></i><div id='Okv3W'><tfoot id='Okv3W'></tfoot><dl id='Okv3W'><fieldset id='Okv3W'></fieldset></dl></div>
                1. <tfoot id='Okv3W'></tfoot>

                  本文介绍了使用 Chart.js,如何避免工具提示重叠?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用

                  解决方案

                  您可以使用这些代码片段实现一些重叠解决方案:

                  工具提示:{模式:'索引',相交:假,y填充:2,xPadding:2,插入符号大小:0,边框宽度:0,}

                  I am using Chart.js via Angular Char. I have displayed all the tooltips in order to download a chart with the information displayed by creating a plugin.

                  The tooltips overlap, there doesn't seem to be any logic to distribute them so that they don't. Is there a way to do this?

                  Some of the plugin code. This isn't important to my question. The 'beforeRender' function creates a new Chart.Tooltip for each item in the dataset and afterDraw renders them:

                  // turn on tooltips
                  chart.options.tooltips.enabled = true;
                  Chart.helpers.each(chart.pluginTooltips, function (tooltip) {
                  tooltip.initialize();
                  tooltip.update();
                  // we don't actually need this since we are not animating tooltips
                  tooltip.pivot();
                  tooltip.transition(easing).draw();
                  

                  The chart:

                  解决方案

                  You can achieve some overlap solution using these snippets:

                  tooltips: {
                      mode: 'index',
                      intersect: false,
                      yPadding: 2,
                      xPadding: 2,
                      caretSize: 0,
                      borderWidth: 0,
                  }
                  

                  这篇关于使用 Chart.js,如何避免工具提示重叠?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Chartjs - 如何在 x 轴标签上获取最后 7 天? 下一篇:Chart.js 为比例添加填充

                  相关文章

                  • <bdo id='xN87r'></bdo><ul id='xN87r'></ul>

                2. <small id='xN87r'></small><noframes id='xN87r'>

                  <tfoot id='xN87r'></tfoot>

                  <legend id='xN87r'><style id='xN87r'><dir id='xN87r'><q id='xN87r'></q></dir></style></legend>
                3. <i id='xN87r'><tr id='xN87r'><dt id='xN87r'><q id='xN87r'><span id='xN87r'><b id='xN87r'><form id='xN87r'><ins id='xN87r'></ins><ul id='xN87r'></ul><sub id='xN87r'></sub></form><legend id='xN87r'></legend><bdo id='xN87r'><pre id='xN87r'><center id='xN87r'></center></pre></bdo></b><th id='xN87r'></th></span></q></dt></tr></i><div id='xN87r'><tfoot id='xN87r'></tfoot><dl id='xN87r'><fieldset id='xN87r'></fieldset></dl></div>