Will iText 7 render ChartJS chart? - javascript

Is it possible to render a ChartJS chart within a PDF generated by iText 7 (iText.Html2Pdf.HtmlConverter.ConvertToDocument)? This is a dot net core project.
When I try to do this I get an empty space in the PDF where the chart is supposed to appear. Rest of the PDF renders correctly.
If I save the HTML to a file it does render the chart correctly in the browser.
I can share the code, but wanted to check first if iText.Html2Pdf.HtmlConverter.ConvertToDocument will even attempt to render the chart or not.

Related

I have a plotly and flourish graph in my web page and I wanted to use javascript to automatically capture a screenshot of the web page including graph

I am currently using html2canvas library to get screenshot of the page when it first loaded but it does not capture the graph and shows a blank space in place of those graphs. So is there any other way to get screenshot of those graphs created by flourish/plotly library?

Bokeh export all charts, tables in a single image

I m building some chart usign bokeh chart.
This is the output:
Now I want to know if is possible to create a Print or an image to print. In my case I can export as image only chart and not Table too.
AFAIK, there's nothing built into Bokeh for that.
However, you can implement it directly using some of the links in this answer: https://stackoverflow.com/a/18581496/564509
Alternatively, you can just print the whole web page using window.print().

Highstock not rendering properly; displays empty series until zooming in

I've got Highstock running on a website loading two series from two different csv/log files on the same webserver.
I previously had this exact setup on a different server where it worked flawlessly.
On the new server, however, the chart doesn't render properly. When the page is loaded the series lines do not display. If you zoom in, or scroll away from the rightmost edge of the chart the lines pop into view. If you scroll back all the way to the right the lines stop displaying.
The actual chart can be seen here on this temporary page:
http://maxedin.com/pages/18/
The JS which loads the chart here:
http://jsfiddle.net/3Jpb3/
The chart is loaded with this div element:
<div id="mholmen" style = "width:100%"></div>
I've tried playing around with the different zoom options, chart sizes, modifying the data that's being loaded and such to no luck.
Has anyone else bumped into this same issue and managed to fix it?
In your data you have some NaN's, for example:
lines[2154]: Array[2]
0: NaN
1: NaN
Which can not be displayed on a chart. Make also sure that data doesn't contain duplitaced and is ordered for xAxis ascending.
Thanks to Pawel Fus I figured it out. Turns out the text editor nano which I used to view and edit the log files did some odd things while saving them. Editing the files in textwrangler fixed my problems. Go figure.

Display a Excel chart in Html page

I have a EXCEL file containing multiple Tables and Charts.
I want to create a web page to display a particular Table and a Chart. I used java script to display the table.
But cant find a way to display the CHART. By chart i mean it contains a pie graph or bar graph.
Is it possible to display using java script? Or do i have to use JSP/something else?
Take a look at Google Chart Tools. Here is an example with javascript source code. If you are building the table on the server side, you may instead want to pass the data down JSON encoded and then build both the table and chart at the same time without having to pass the data twice.
An easier way would be to use a free tool like oomfo, which is a PowerPoint plugin to create charts. It lets you pull data from excel, create charts and then export the entire slide as HTML - the charts are in Flash and JavaScript (fallback). Just add a line of code in the output web page to render JavaScript charts only.

Refresh Google Charts without redrawing the entire chart?

I'm creating a page where javascript creates random numbers and then draws a Google line chart from it. the idea is that data will continue coming and the chart has to be updated. What I'm doing right now is redraw the chart for every new data addition, which means redrawing the entire chart 20 times a second. This however slows down the process considerably.
What I'm wondering is, is there a way to add a row to Google Charts and take out a row (like shift and push) and have the chart update without redrawing?
If that doesn't work do you guys have suggestions for live data visualization tools?
Google charts are images served by Google's API. There's no way to change just part of an image, you have to load a new image. If you want a chart that changes, look at HighCharts. It's a Javascript charting package that has examples like you want. D3 also is very powerful, but requires more work.

Categories