Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将Chart.JS导出到Excel_Chart.js_Export To Excel - Fatal编程技术网

将Chart.JS导出到Excel

将Chart.JS导出到Excel,chart.js,export-to-excel,Chart.js,Export To Excel,有没有办法将使用chart.js制作的图表导出到Excel中? 谢谢你的帮助 <canvas id="chart" width=600 height=600></canvas> const myChart = new Chart(document.getElementById('chart').getContext("2d"), { type: 'horizontalBar', data: { labels: ['

有没有办法将使用chart.js制作的图表导出到Excel中? 谢谢你的帮助

<canvas id="chart" width=600 height=600></canvas>

const myChart = new Chart(document.getElementById('chart').getContext("2d"), {
  type: 'horizontalBar',
  data: {
    labels: ['One', 'Two', 'Three', 'Four', 'Five', 'Six'],
    datasets: [{
      label: 'My data',
      data: [12, 19, 3, 5, 2, 3],
      backgroundColor: 'rgba(255, 99, 132, 0.2)',
      borderColor: 'rgba(255,99,132,1)',
      borderWidth: 1
    }]
  },
  options: {
    animation: {
        duration: 1500,
    }
  }
});

const myChart=新图表(document.getElementById('Chart').getContext(“2d”){
键入:“水平线”,
数据:{
标签:[“一”、“二”、“三”、“四”、“五”、“六”],
数据集:[{
标签:“我的数据”,
数据:[12,19,3,5,2,3],
背景颜色:“rgba(255,99,132,0.2)”,
边框颜色:“rgba(255,99132,1)”,
边框宽度:1
}]
},
选项:{
动画:{
持续时间:1500,
}
}
});