1. <small id='7yh6a'></small><noframes id='7yh6a'>

        <legend id='7yh6a'><style id='7yh6a'><dir id='7yh6a'><q id='7yh6a'></q></dir></style></legend><tfoot id='7yh6a'></tfoot>

          <bdo id='7yh6a'></bdo><ul id='7yh6a'></ul>

      2. <i id='7yh6a'><tr id='7yh6a'><dt id='7yh6a'><q id='7yh6a'><span id='7yh6a'><b id='7yh6a'><form id='7yh6a'><ins id='7yh6a'></ins><ul id='7yh6a'></ul><sub id='7yh6a'></sub></form><legend id='7yh6a'></legend><bdo id='7yh6a'><pre id='7yh6a'><center id='7yh6a'></center></pre></bdo></b><th id='7yh6a'></th></span></q></dt></tr></i><div id='7yh6a'><tfoot id='7yh6a'></tfoot><dl id='7yh6a'><fieldset id='7yh6a'></fieldset></dl></div>
      3. 在 vue 3 中使用 vue-chartjs:createElement 不是函数

        时间:2023-11-01

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

                1. <tfoot id='KvHFz'></tfoot>

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

                  本文介绍了在 vue 3 中使用 vue-chartjs:createElement 不是函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 Vue.js 3,由于这个错误,我无法使用 Vue-chartjs 制作图表:

                  I'm using Vue.js 3 and I can't make a chart with Vue-chartjs because of this error:

                  Uncaught TypeError: createElement is not a function
                      at Proxy.render (BaseCharts.js?86fc:8)
                      at renderComponentRoot (runtime-core.esm-bundler.js?5c40:673)
                      at componentEffect (runtime-core.esm-bundler.js?5c40:4475)
                      at reactiveEffect (reactivity.esm-bundler.js?a1e9:42)
                      at effect (reactivity.esm-bundler.js?a1e9:17)
                      at setupRenderEffect (runtime-core.esm-bundler.js?5c40:4458)
                      at mountComponent (runtime-core.esm-bundler.js?5c40:4416)
                      at processComponent (runtime-core.esm-bundler.js?5c40:4376)
                      at patch (runtime-core.esm-bundler.js?5c40:3991)
                      at mountChildren (runtime-core.esm-bundler.js?5c40:4180)
                  

                  这是显示我的图表的 App.vue:

                  this is App.vue that displays my chart:

                  <template>
                    <line-chart />
                  </template>
                  
                  <script>
                  import LineChart from "./components/Chart";
                  export default {
                  
                    name: "App",
                    components: {
                      LineChart
                    }
                  };
                  </script>
                  

                  这是渲染折线图的 Chart.vue:

                  and this is Chart.vue that renders a line chart :

                  <script>
                  import { Line } from "vue-chartjs";
                  export default {
                    extends: Line,
                    data: () => ({
                      chartdata: {
                        labels: ["January", "February"],
                        datasets: [
                          {
                            label: "Data One",
                            backgroundColor: "#f87979",
                            data: [40, 20]
                          }
                        ]
                      },
                      options: {
                        responsive: true,
                        maintainAspectRatio: false
                      }
                    }),
                  
                    mounted() {
                      this.renderChart(this.chartdata, this.options);
                    }
                  };
                  </script>
                  

                  我已经尝试过使用各种形式的数据,但显然,问题出在其他地方.是否必须等待 vue.js 3 生态系统变得更加完整?

                  I have tried this with various forms of data, but apparently, the problem is elsewhere. Do I have to wait for the vue.js 3 ecosystem to become more complete?

                  推荐答案

                  https://github.com/无孔径/vue-chartjs

                  Vue Charts 似乎还没有为 vue3 做好准备

                  Vue Charts does not seem to be ready for vue3

                  兼容性

                  v1 later @legacy
                      Vue.js 1.x
                  v2 later
                      Vue.js 2.x
                  

                  在这里讨论vue3:https://github.com/apertureless/vue-chartjs/问题/601在这里:https://github.com/apertureless/vue-chartjs/issues/637

                  Discussion about vue3 here: https://github.com/apertureless/vue-chartjs/issues/601 and here: https://github.com/apertureless/vue-chartjs/issues/637

                  这篇关于在 vue 3 中使用 vue-chartjs:createElement 不是函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何使用 chart.js 将图像作为标签添加到画布图表 下一篇:ChartJS 甜甜圈图表渐变填充

                  相关文章

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

                2. <tfoot id='uD9NY'></tfoot>

                      • <bdo id='uD9NY'></bdo><ul id='uD9NY'></ul>
                      <legend id='uD9NY'><style id='uD9NY'><dir id='uD9NY'><q id='uD9NY'></q></dir></style></legend>

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