小编Muh*_*man的帖子

如何从 ApexCharts 获取 URI 以下载 PDF?

我已经实现了 ApexCharts 并希望将其输出到 PDF 文档中。

我尝试从 获取下载 URI chart.dataURI,但失败并出现错误:

Chart.dataURI 不是函数

下面是 Apex 条形图的创建以及我对下载 URI 的尝试,但它无法获取:

var options = {
  chart: {
    height: 450,
    type: 'bar',
    width: 1000,
  },
  plotOptions: {
    bar: {
      horizontal: false,
      columnWidth: '40%',
      endingShape: 'rounded'
    },
  },
  dataLabels: {
    enabled: false
  },
  colors: ['#008000', '#d4a823', '#f92525'],
  stroke: {
    show: true,
    width: 2,
    colors: ['transparent']
  },
  series: [{
    name: 'Good',
    data: JSON.stringify(graph_data.good)
  }, {
    name: 'Okey',
    data: JSON.stringify(graph_data.ok)
  }, {
    name: 'Bad',
    data: JSON.stringify(graph_data.bad)
  }],
  xaxis: …
Run Code Online (Sandbox Code Playgroud)

javascript pdf-generation jspdf apexcharts

4
推荐指数
1
解决办法
8531
查看次数

标签 统计

apexcharts ×1

javascript ×1

jspdf ×1

pdf-generation ×1