I have created this line chart using D3.
Suppose I need to add some .png image from the local file on my puter to the above graph, how can I do that?
Thank you very much.
I have created this line chart using D3.
http://bl.ocks/d3noob/a22c42db65eb00d4e369
Suppose I need to add some .png image from the local file on my puter to the above graph, how can I do that?
Thank you very much.
Share Improve this question asked Nov 23, 2015 at 9:21 ArtigaArtiga 7962 gold badges17 silver badges39 bronze badges1 Answer
Reset to default 6You can add background
property through CSS to svg
element as any other HTML tag. For example, like this you will have google logo on background:
svg {
background: url('https://www.google.nl/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png') no-repeat;
}
More on properties you can use in background, w3schools.