css issue while downloading png image from svg in nvd3 - css

I have one line chart using nvd3.js . I want to download this chart in .png format.
I am using canvas and sending the canvas.toDataURL("image/png") to server and downloading the image, but the image is not in proper shape .it seems the css(nvd3.css) is not getting applied.
Any help will be really heplfull.
Thanks,
chandan

i have the same requirement and "example of how to export a png directly from an svg" solved my problem (internally it adopted svg-crowbar code. basically, you need to "explicitly set css style" for all svg element.

Related

Where and how is bootstrap image stored?

I downloaded the bootstrap template, but I can't figure out where the images are stored smile and tachometer. I have not found them among other svg images or other format.
It seems to me they are stored somehow differently, but a search on fa-tachometer-alt shows me the css files. Perhaps the image is drawn through css. But I don't understand how this is done?
Thats not an image itself its a webfont called font-awesome

How create css semi donut menu

i'm try create semi donut menu by css same enter image description here
But I've found was it was written with SVG,i do not know about SVG, i'm looking for by CSS. Thanks.
As you correctly acknowledge, ideally you would use SVG, and I recommend downloading Inkscape and producing the menu there and then simply embedding the SVG.
With that said, it can be done with pure CSS using transforms. Here's a good tutorial: https://tympanus.net/codrops/2013/08/09/building-a-circular-navigation-with-css-transforms/

How to find out the image source used in a background image data?

I found out on a website an image which I like very much but when I inspected the source code with firebug i found out that it was not an image, but a div with the following CSS condition:
background-image: url("data:image/gif;base64,R0lGODlhJQAFAJECAMwAM7C2uP///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3Lnc...");
Is there any way to find out the path to that image?
That IS the path (sort of). Just copy the "data:image/gif..... "-part and paste into your browser, and the browser will render it for you.
The image is embedded so if you want that image the better option is, directly save that image through that website.

SVG image as background in css and gradients attached in png jpg

Hello illustrator export vector to svn and created attachments with gradients in jpg and png files. How to attach this files to see gradients. I use it as a background in css like this:
background:url(gfx/logo.png) 0 0 no-repeat; background-image:url(gfx/logo.svg),none;
(it means that if browser not support svg then show png)
any ideas ?
If you create your svg in Adobe Illustrator, there are Options for Image Location while saving: Embed or Link. Selecting Embed might help with complex vectors with gradients and filters applied, whose would be saved as a single file, and you will be able to use it as a background.

Images in svg file doesn't show up in Qt

I'm trying to display a svg image with Qt and it works well except that any image (.gif, .bmp, ...) in the svg image doesn't show up (lines, circles, texts works OK).
If I open the svg in firefox the image displays correctly.
I have put qgif4.dll in a folder imageformats and QtSvg4.dll besides the executable but to no avail.
I'm displaying the svg with the help of svgview.h/.cpp and I'm running on a WinXP machine (Qt version 4.7.2).
Any help greatly appreciated!
If you are loading it via a QIcon, it should work without assistance.
If you are trying to load it using a QPixmap or QImage - you can't. You have to use QSvgRenderer (or the related classes) in the svg module to rasterise the data.

Resources