score:0
i am not sure how to export chart report to pdf and csv format with chartnew.js?
since you've put csv, i presume you mean the data and not the chart.
for csv, you can easily generate the file based on https://www.rfc-editor.org/rfc/rfc4180 with mostly string concatenation and wrapping. you could also do the same thing on the client side using data uris (see how to create a file in memory for user to download, but not through server?)
for pdf, it might be easier to use a library. for .net, best server-side .net pdf editing library should give you a good solution. there is also a java version of it.
if you are looking to export the chart as well, csv does not support this.
for pdf, you could export your canvas to a data uri (see https://developer.mozilla.org/en-us/docs/web/api/htmlcanvaselement/todataurl) and use a client side library like jspdf (see how to add image in jspdf? for an example) or do the same thing on the server using itext / itextsharp (see inputting image data to pdf with itext)
Source: stackoverflow.com
Related Query
- How to export a chart in Excel and PDF format using Chart.js
- How can I export data from a csv file or excel file to a javascript object?
- How to run Chart.js samples using source code
- How to export charts.js dynamic chart to PDF in Rails
- How to export report as PDF/CSV in ChartNew.js
- How to create pdf file in node js
- How do I import a csv into chart.js?
- How to export a chart.js chart to excel?
- How to add ChartJS code in Html2Pdf to view image
- Export HTML content with Chart.jscanvases to PDF
- How do I add time sourced from an external source as an X axis to a ChartJS graph?
- Chartjs not working with d3 from csv source
- How to generate chartjs charts to pdf using laravel?
- How to generate color code dynamically by swapping 2 characters within a string using PHP
- How to make bars different colours in Chart.js with csv data?
- How to write better code in es6 for formatting an object with array values
- How to use chart.js for financial with dynamic CSV data?
- How to convert (convas chart) to either (Chart , or system.drawing.image , or stream , or []byte ) where I can use it in c# to generate pdf
- C# How to print html Convas element in PDF document
- Export chart and table both to pdf
- How to print a chart rendered by code
- reveal.js with plotly.js and chart.js export pdf
- How to export Chart.js chart using toBase64Image, but with no transparency?
- How to export chart.js graph to svg in vue?
- How to generate PDF with Chart.js
- How do I destroy/update Chart Data in this chart.js code example?
- How do I use the return values from csv ajax request for x and y values?
- How to improve PDF rasterization quality in PhantomJS?
- How Export an Editable Chart with content to PPT and Excel
- How to change chart background colour when exporting to PDF with chart.js
More Query from same tag
- chart.js 2.7.1 | Updating charts with variables
- Chart.js v3: How can I grow fontsize of legend of my graph?
- Detect if the click is in bar or outside of bar in ChartJS
- Change X and Y axis font color
- Add all data in the tooltip of Chart JS
- How to create Bar chart that gets updated from new ajax requests with ChartJS?
- vue-chartjs not working properly in flexbox and when resize chart goes blank
- Fix number distributions after scaling the range
- laravel-chartjs not displaying anything
- Chart.js show data in chronological order
- issue upgrading from chart.js 1 to 3.5
- Completely hide the Y-axis on chartjs when data is hidden
- Setting up min and max in chartjs did not work
- Chart.js graph with just two cordinates
- How to render multiple Chart.JS charts on the same page with AJAX data and variables
- Reference to the previous element in the array - in Javascript
- Chart.js bar chart labels do not valign
- Chart js custom datalabel from array
- charts.js global options gridLines
- Problem with primeNG chart: Module not found: Error: Can't resolve 'chart.js/auto'
- Problem displaying two graphs on a single chart using javascript and chart.js
- Angular-Charts bar chart does not update when I change the data, series, labels
- How to highlight a section of a stack in all bars in a stacked barchart in chartjs
- How to update ChartJS in a long polling & stop animation stuttering?
- Chart.js 3.6.2, Angular 10: Logarithmic Line chart Y-Axis problems. How to set and keep Y-Axis properties, even when data changes?
- Chart.js not being displayed inside Jquery Dialog
- how do I change the textsize in of doughnut in react-chartjs-2?
- Second tab doesn't show the chart . Can anybody see why?
- How to add symbols in angular charts?
- How to remove excess lines on X axis using chartjs?