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

      1. <small id='ur3Jm'></small><noframes id='ur3Jm'>

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

        ChartJS 3 不显示图例

        时间:2023-11-01

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

          • <tfoot id='HJk63'></tfoot>

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

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

                1. 本文介绍了ChartJS 3 不显示图例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我使用的是 ChartJS 3.7,即使我通过 options.plugins.legend.display 一个 true,也不会显示图例.如何让图例显示?

                  I'm using ChartJS 3.7 and even when I pass options.plugins.legend.display a true, the legend isn't displayed. How do I get the legend to show?

                  推荐答案

                  看起来较新版本的 ChartJS 要求您注册要使用的各个元素.您需要专门注册图例.

                  Looks like newer versions of ChartJS require you to register the individual elements you're going to use. You need to register the legend specifically.

                  import { Chart, Legend } from 'chart.js';
                  // ...
                  Chart.register(Legend);
                  

                  这篇关于ChartJS 3 不显示图例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何使用charts.js在折线图中绘制单个值? 下一篇:Chart.js 2.0 甜甜圈工具提示百分比

                  相关文章

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

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

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