score:0
var image = ;//image link
Give the link to your image above
point.append("image")
.attr("xlink:href", image)
.attr("x", -12)
.attr("y", -12)
.attr("width", 24)
.attr("height", 24)
;
Make sure you give it attributes : x/y, width/height
score:3
Under the hood, FontAwesome and libraries like it are just setting the CSS content of their <i>
tag to a unicode character from their font family.
If you inspect an icon ::before
you'll see something like this:
.fa-camera-retro:before {
content: "\f083";
}
In SVG this would be equal to:
<text></text>
Translating this into d3 then becomes:
<style>
.symbol {
font-family: FontAwesome;
font-size: 16px;
}
</style>
<script>
var t = svg.append("g")
.selectAll(".symbol")
.data(data)
.enter()
.append("text")
.attr("class", "symbol")
.html(function(d,i){
return "";
})
.attr("x", function(d, i) {
return x(d.x);
})
.attr("y", function(d, i) {
return y(d.y);
});
</script>
Here's a similar answer I gave about Highcharts.
See d3.js example here.
Source: stackoverflow.com
Related Query
- How do I display an icon at a point on a line chart using d3.js
- how to display data from 1st point on words on y axis for line chart in d3.js
- How to display custom tooltips on line chart using Rickshaw Library
- How to plot animated line chart using d3 while the data table is required to be updated every 1 second?
- D3 Line Chart to display first and last point values
- how to display bottom data for row chart using dc.js
- D3: how to show lone point in a line chart
- Using D3.js, How can I detect when a point on an animating line is reached?
- How to change color of line in line chart using dimple.js?
- NVD3 Line Chart doesn't display when data passed using ajax - data.map is not a function
- How to create a % difference arrow line with value in a bar chart using D3.js
- How to place Circles(dots) in line chart using "d3.js " library?
- Having issue to display line chart using d3.js in .NET MVC C# project
- how i can put more lines in Line Plus Bar Chart using nvd3.js?
- How to toggle lines in a line chart using a legend
- Unable to display line chart for this JSON structure using D3.js?
- How to change color of a data point in line chart according to a condition?
- How Can I display dates on the x-axis using nvd3 line charts
- Line chart - how to display data points whilst line path is being drawn
- how to get data from mongodb and display as a d3 chart using nodejs
- Using D3, how can I transition a line one point at time?
- How to display most recent value in line chart
- How to display D3 Chart using directive?
- How to display discontinuous line chart
- How to draw line plus bar chart using highcharts/d3.js or any other chart library?
- How to draw a d3.js line chart using angularjs directives
- How do I set a different range for line chart embedded in a bar chart using d3.js
- how to make real time multi line chart using d3 where data is from api in json format
- How to create a multiseries line chart using data filtered from a csv file?
- How can I put a space between the lines of a line chart using d3.js
More Query from same tag
- possible to tween d3.geo.circle().angle()
- Styling in D3 with a loop?
- D3.JS Bubble Chart - reset chart when reducing circle size
- How can I embed a graph from d3js with CSS
- how to use <h1> in c3.js div?
- Right way to transform D3 into AngularJs
- d3 nested grouped bar chart
- D3.JS: implementing Force-Directed Graph for my tag data structure
- Simple Map D3 JSON
- How to create dynamic y scale values in D3 js depending on the screen size?
- Sankey diagram transition
- D3 - Can't create line chart with time data
- How to make this JSON into World Map?
- Extract a slice of a large multi-dimensional array in Javascript
- D3.js, Sortable Barchart not displaying
- Animate line chart in d3
- d3.js multiple line chart rendering: Same dataset but different curve
- change height and direction of triangles in D3
- How to bring foreignObject elements in SVG to the top layer?
- How to handle heavily nested objects with D3
- D3.js stacked bar chart of array of object
- Update the heatmap based on the selected data
- How to parse web audio frequency data with d3 js
- Why is scale only working the first time I doubleclick?
- Show d3 node text only on hover
- d3.js partition.nodes(root) does not set the nodes x or dx values
- d3.timeScale() X axis doesn't display years
- Is it possible to find the distance between ticks in D3.js?
- halven d3 pie chart
- Getting query selector value d3.js