<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 不显示图例

        ChartJS 3 doesn#39;t display legend(ChartJS 3 不显示图例)

          <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 不显示图例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  ChartJS Version 3 - common legend for multiple line charts(ChartJS 版本 3 - 多个折线图的常用图例)
                  Charts.js scales yaxes ticks min max doesnt work(Charts.js 缩放 yaxes 刻度 min max 不起作用)
                  How to expand the slice of donut chart in chartjs?(如何在chartjs中扩展圆环图的切片?)
                  Chart.js yAxes Ticks stepSize not working (fiddle)(Chart.js yAxes Ticks stepSize 不起作用(小提琴))
                  Rounded corners on chartJS v.2 - bar charts (with negative values)(chartJS v.2 上的圆角 - 条形图(带负值))
                  How to hide value in Chart JS bar(如何在 Chart JS 栏中隐藏值)
                    <legend id='rOE4E'><style id='rOE4E'><dir id='rOE4E'><q id='rOE4E'></q></dir></style></legend>

                      • <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'>

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