<small id='4cY4h'></small><noframes id='4cY4h'>

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

        • <bdo id='4cY4h'></bdo><ul id='4cY4h'></ul>
      1. 如何在 Chart JS 栏中隐藏值

        How to hide value in Chart JS bar(如何在 Chart JS 栏中隐藏值)

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

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

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

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

                  <tbody id='DTHrY'></tbody>
                  本文介绍了如何在 Chart JS 栏中隐藏值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我尝试将值隐藏在条形图的条内.这样做的原因是我将值放在了条形图的顶部,并且该值不应显示两次.

                  i try to hide the value inside the bars of my bar chart. The reason for that is that i placed the value on top of the bars, and the value should not be shown twice.

                  我尝试了不同的选项来隐藏该值,但没有奏效.

                  I tried different options to hide the value but it did not work.

                  在下面你可以看到一个截图,我想删除条内的数字.

                  In the following you can see a screenshot, i want to remove the numbers inside the bars.

                  条形图

                  推荐答案

                  默认情况下,Chart.js 本身不绘制任何数据标签(值).您很可能已经激活(导入)了一个插件,例如 chartjs-绘制这些值的插件数据标签:

                  Chart.js does not draw any data labels (values) itself by default. You most probably have activated (imported) a plugin such as chartjs-plugin-datalabels that draws these values:

                  <script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels"></script>
                  

                  只需从您的代码中删除 script 标记.为特定图表实例禁用全局插件仅,插件选项必须设置为 false.

                  Simply remove the script tag from your code. To disable a global plugin for a specific chart instance only, the plugin options must be set to false.

                  chartjs-plugin-datalabels 的情况下,这将按如下方式完成:

                  In the case of chartjs-plugin-datalabels, this would be done as follows:

                  options: {
                    plugins: {
                      datalabels: {
                        display: false
                      }
                    },
                  }
                  

                  这篇关于如何在 Chart JS 栏中隐藏值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 上的圆角 - 条形图(带负值))
                  Show data values in Chart.js bars (version 3)(在 Chart.js 条形图中显示数据值(版本 3))
                      <bdo id='XsUzz'></bdo><ul id='XsUzz'></ul>
                    • <small id='XsUzz'></small><noframes id='XsUzz'>

                      <tfoot id='XsUzz'></tfoot>
                    • <legend id='XsUzz'><style id='XsUzz'><dir id='XsUzz'><q id='XsUzz'></q></dir></style></legend>

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

                          <tbody id='XsUzz'></tbody>