Chart from d3.js to file without displaying on a page first - d3.js

I am new to d3 but I am hoping that it possible to create a chart in d3 and output the chart to a file without displaying it on a page first. Is it? I would like to include various charts in a pdf document using fpdf and import into the pdf a chart or two.
I have been searching around for a solution to this for some time now. While I can see that you can:
Use d3 (chart.js etc) to generate a chart and display it on screen in a page
Export the image to file on the server
And then create the pdf importing the saved image
But I want to avoid any on screen display and for the image of the chart to be saved to the server directly so that fpdf can import it in.
This seems to me something that would be required frequently but I can't seem to find a solution.
An option seems to be to use something like phantomjs as an interim step but I think that this needs to be running on my host. It would be great if it could be exported to file driectly from d3. Is this possible?

Related

D3 JS Exported Maps Image Quality Issue

We are using d3.js to create the maps in our application via reading .csv file that has latitude and longitude to plot the location but sue to huge data (~200k latitudes and longitudes in the .csv file) the maps creation is taking around 1 minute.
To avoid this much of delay we are exporting the maps into an image using SaveSvgAsPng.js library and once the image is created we are displaying the image on the app instead of creating the map every time the user logs into to the application (below is the code snippet from saveSvgAspng.js library)
Now with this approach we are seeing each time the image is exporting differently and there is drop in the image quality of the map (attached the image)
Raising this here to get some help in fixing this issue or if someone has faced this before as this is being the show stopper for our application. Happy to add more details if these are not sufficient.

Add markers to image similar to what the mapping apps do - Xamarin.Forms

I am currently using Xamarin.Forms and I would like to import an image and be able to add markers to it. Similar to what the mapping apps do, but want to be able to do it from an uploaded image or from taking a photo. I would also Like to be able to set a scale on it after the image was uploaded by placing two or more markers and then entering a measurement between those markers.
When displaying an image/photo I would like to place markers on them that would have more info about the pinned location on the image. These pins must be saved in a database so that the next time it's opened the markers will be in the correct location as they were placed the first time.
If anyone knows how I can get started on this, or know of any libraries that allow you to this, it would really be appreciated.
.
Update
Loading the image from file, camera or url is simple enough.
Zooming in and out after the image is loaded was simple enough too. Altering the scale size of the Image by making use of the PinchGesture.
Moving the image around ended up being simple too, and it was achieved by using the PanGesture and altering the TranslationX and TranslationY.
.
.......Still searching for a working and reliable solution for adding Pins/Markers at a location on the image and the markers need to have a click or tap event attached to it.

kendo chart export to excel with image as well as data

I have a kendo chart where i can export the image from javascript side but it will ask for save the image but i wanted to store the image in particular path without asking and then export the image into excel and then add some data along with the image.Please help me how to acheive this functionality.
Have you seen http://demos.telerik.com/kendo-ui/chart-api/export ?
I think you can save the chart in either of the three mentioned formats.
And,i guess saving path can be mentioned in the same.

Import and parse SVG file in D3.js

I have SVG files created elsewhere (using MS Visio) which I would like to use as background for a visualization, where some positioning is driven by the placement of items in the SVG graphic. Ideally, I would be able to manipulate the imported SVG data directly, and then use it to create elements in the calling document using D3.
Is there a simple way to import an existing SVG document into a data structure using D3, similarly to the way that JSON can be imported? I've tried d3.xml, but don't seem to get a useful data structure. Importing the graphic with an IMG tag doesn't populate the DOM with SVG elements as far as I can see.
One small complication: it must also work in IE9! (ImportNode doesn't work)
Thanks for the ideas. I found out what to do in the end. It is possible to import the SVG file using a d3.xml call. The parsing is done, but the complication is how to understand the DOM structure which is produced. IE9 seems to have a problem with placing the imported node, but I don't need that behaviour as I only want to use aspects of the incoming SVG, and will be regenerating SVG using D3

Using VB2010 to view an Excel 2003 chart

I am trying to take a chart(on it's own "sheet", not as an object inside of another "sheet"), and display it on a VB2010 windows form.
The only thing I could find was creating the chart using code, and then loading in the data series from excel. ie. Chart1.ChartType = "XYscatter" or something along those lines, and I haven't even gotten that to work right.
I have way to many charts to go through and manually set them to the way they should be. Is there an easy way to just use Imports Microsoft.Office.Interop to do something along the lines of
Chart1 = xlWorkBook.Charts("MyChart")
?
Your are on the right line, if you have specific questions about creating a chart with code, post what you've got and i'll see if i can help
If you want to display the chart on a .Net form it might be best to take an image of the chart and put that on the form
get a chart object:
Set Chart1 = xlWorkBook.Charts("MyChart")
copy it
Chart1.ChartArea.Copy
its now on the clipboard. you should be able to access from there in .Net as you see fit
To prove its there, you can paste it into a normal excel worksheet
ActiveSheet.PasteSpecial Format:="Picture (Enhanced Metafile)", _
Link:=False, DisplayAsIcon:=False

Resources