Must know in D3js | Fresco Play

Must know in D3js | Fresco Play

Monday, May 22, 2023
~ 3 min read
Must know in D3js | Fresco Play

Question 1: What does SVG stand for?

Answer: Scalable Vector graphics


Question 2: What are the prerequisites to learn D3?

Answer: HTML, CSS, Javascript


Question 3: D3 is used to create ________?

Answer: SVG


Question 4: D3 is developed by ________

Answer: Mike Bostock


Question 5: What is the full form on D3?

Answer: Data driven documents


Question 6: _______is the correct syntax to generate the simplest D3 js Axis

Answer: var xAxis= d3.scale.axis();


Question 7: What is the correct syntax to draw a circle in D3

Answer: svg.append("circle").attr("cx", 200).attr("y", 150).attr("r", 50);


Question 8: _______is the syntax to read JSON data

Answer: d3.json


Question 9: _______is or are the main selection in D3

Answer: All the options


Question 10: What is the syntax to draw a line in D3

Answer: svg.append("line").attr("x1", 0).attr("y1", 200).attr("x2", 100).attr("y2", 100);


Question 11: ______ scale creates linear scale in D3

Answer: d3.scaleLinear


Question 12: Which is best way to create stacked chart in D3 js?

Answer: d3.layout.stack


Question 13: Which of the following attribute is being used to put the pen down at (10,25) in SVG?

Answer: M 10 25


Question 14: Can we group SVG Elements in D3js?

Answer: True


Question 15: What does the following code do? d3.select('body').append("p").attr("id", “para”)

Answer: Appends a “p” element to body and assigns an id “para” to newly created p element


Question 16: Which of the following command is comparator function that is used for a natural order?

Answer: d3.ascending (a, b)


Question 17: Can we do cross filters through D3js?

Answer: True


Question 18: Using which method of d3 can we add elements to html dom structure ?

Answer: 1. d3.html() 2. d3.add()


Question 19: When is the mouseover event raised?

Answer: when mouse cursor is moved over an element


Question 20: Which is the correct way to use XML file for D3 ?

Answer: 1. d3.xml([,callback]url[mimeType]) 2. d3.load("sample.xml")


Question 21: Which of the following method can be used to move selected element before other?

Answer: d3.selection.prototype.moveToFront


Question 22: var scale = d3.scaleLinear() .domain([100, 500]) .range([10, 350]); What will be the output of scale(300)?

Answer: 180


Question 23: var dataset = [ [5, 20], [480, 90], [250, 50], [100, 33], [330, 95], [410, 12], [475, 44], [25, 67], [85, 21], [220, 88] ]; d3.max(dataset, function(d) { return d[0]; }); What will be output of d3.max() function?

Answer: 480


Question 24: What are the attributes required to create an ellipse?

Answer: "cx", "cy", "r"


Question 25: var dataset = [ 5, 10, 15, 20, 25 ]; What will be output of d3.extent(data)?

Answer: 5


Question 26: Which is not a valid scale in D3 JS?

Answer: Ordinary


Question 27: Which of these methods help alter zoom modes in d3 js?

Answer: d3.zoom.behavior()


Question 28: Which method is used for adding tooltips?

Answer: 1. d3.tooltip() 2. d3.tipOver()


Question 29: Which is not a slider available in d3.js?

Answer: Slider with mid value


Question 30: When trying to select a non existent dom element what is returned by d3?

Answer: Null array


Post a comment

Comments

Join the conversation and share your thoughts! Leave the first comment.

Get your FREE PDF on "100 Ways to Try ChatGPT Today"

Generating link, please wait for: 60 seconds

Checkout all hot deals now 🔥

Search blogs

No blog posts found