D3.js is a JavaScript library. It is used to implement dynamic, interactive, and data visualizations in web browsers. D3.js is the successor to the earlier Protovis framework.
D3.js MCQs: This section contains multiple-choice questions and answers on the various topics of D3.js. Practice these MCQs to test and enhance your skills on D3.js.
List of D3.js MCQs
1. D3.js stands for ____.
- Data document and dom manipulation
- Data-driven documents
- Dom data documents
Answer: B) Data-driven documents
Explanation:
D3.js stands for data-driven documents.
2. D3.js is a ____ library.
- JavaScript
- Python
- Java
- Php
Answer: A) JavaScript
Explanation:
D3.js is a JavaScript library.
3. Which of the following browsers does D3.js supports?
- Chrome, Edge
- Firefox
- Safari
- All of the above
Answer: D) All of the above
Explanation:
D3.js support the following browsers:
- Chrome, Edge
- Firefox
- Safari
- I3 9+
4. Does D3.js runs on a node?
- Yes
- No
Answer: A) Yes
Explanation:
Yes, D3.js runs on a node.
5. Is D3.js an open-source library?
- Yes
- No
Answer: A) Yes
Explanation:
D3.js is an open-source library.
6. DOM stands for ____.
- Document-oriented Model
- Data object model
- Data-oriented model
- Document object model
Answer: D) Document object model
Explanation:
D3.js stands for document object model.
7. In d3.js, a ____ is a function that maps input values to output values.
- Axis
- Transition
- Scale
- Selection
Answer: C) Scale
Explanation:
In d3.js, a scale is a function that maps input values to output values.
8. ____ are used to designate the data values on a scale and assist consumers in comprehending the meaning of a display.
- Axis
- Transition
- Path
- Layout
- Selection
Answer: A) Axis
Explanation:
Axis are used to designate the data values on a scale and assist consumers in comprehending the meaning of a display.
9. A smooth, animated shift in the look or behavior of components in visualization is referred to as a ____ in d3.js.
- Events
- Transition
- Path
- Layout
- Selection
Answer: B) Transition
Explanation:
A smooth, animated shift in the look or behavior of components in a visualization is referred to as a transition in d3.js.
10. SVG stands for ____.
- Scale vector geographically
- Scalable vector graphics
- Scale visual graphics
- Scalable visual graphically
Answer: B) Scalable vector graphics
Explanation:
SVG stands for Scalable vector graphics.
11. Does IE 8 browsers support SVG?
- Yes
- C
Answer: B) No
Explanation:
Except for Internet Explorer 8 and lower, all browsers support SVG.
12. SVG’s default unit of measurement is ____?
- Megapixel
- Byte
- Pixel
- Inches
Answer: C) Pixel
Explanation:
SVG’s default unit of measurement is pixels.
13. In d3.js, a ____ is a collection of DOM items that match a particular selector.
- Selection
- Path
- Events
- Transition
Answer: A) Selection
Explanation:
In d3.js, a selection is a collection of DOM items that match a particular selector.
14. All DOM items are selected by matching the specified CSS selector using which of the following method?
- Selects
- AllSelects
- SelectAll
- None
Answer: C) SelectAll
Explanation:
All DOM items are selected by matching the specified CSS selector using the selectall() method.
15. The ____ function adds a new element as the final child of the current selection’s element.
- End()
- Add()
- AddLast()
- Append()
Answer: D) Append()
Explanation:
The append() function adds a new element as the final child of the current selection’s element.
16. ____ allows you to draw various forms such as lines, rectangles, circles, ellipses, and so on.
- SVG
- Shape
- Array
- Graphics
Answer: A) SVG
Explanation:
SVG allows you to draw various forms such as lines, rectangles, circles, ellipses, and so on.
17. The ____ function enables a transition to occur after a specified amount of time.
- Wait()
- Delay()
- Duration()
Answer: B) Delay()
Explanation:
The delay() function enables a transition to occur after a specified amount of time.
18. A ____ is a string of one or more characters that is used to define the border between distinct, independent areas of plain text or other data.
- Observable
- Delimiter
- Divider
Answer: B) Delimiter
Explanation:
A delimiter is a string of one or more characters that is used to define the border between distinct, independent areas of plain text or other data.
19. TSV stands for ____.
- Time-separated value
- Tab surrounded Value
- Tab-separated value
- Time-surrounded value
Answer: C) Tab-separated value
Explanation:
TSV stands for tab-separated value.
20. Does XMLHttpRequest supports both asynchronous and synchronous request?
- Yes
- No
Answer: A) Yes
Explanation:
XMLHttpRequest support both asynchronous and synchronous request.
21. ____ helps to scale your content.
- Transitioning
- Moving
- Scaling
- Zooming
Answer: D) Zooming
Explanation:
Zooming helps to scale your content.
22. Which method is used in the creation of a new dragging?
- D3.newdrag()
- D3.drag()
- D3.new()
- D3.dragging()
Answer: B) D3.drag()
Explanation:
D3.drag() method is used in the creation of a new dragging.
23. Which method is used to associate data with certain components?
- D3.data()
- D3.dataAttr
- D3.database
- None
Answer: A) D3.data()
Explanation:
D3.data() method is used to associate data with certain components.
24. ____ method groups and aggregates data depending on one or more factors.
- D3.nested()
- D3.groups()
- D3.nest()
- D3.cluster()
Answer: C) D3.nest()
Explanation:
D3.drag() method groups and aggregates data depending on one or more factors.
25. The ____ represents the bounds of your data.
- Area
- Domain
- Range
Answer: B) Domain
Explanation:
The domain represents the bounds of your data.
26. With D3.js, you may acquire the Mouse position by using the ____ method.
- d3.position()
- d3.mousepos()
- d3.mouse()
Answer: C) d3.mouse()
Explanation:
With D3.js, you may acquire the Mouse position by using the d3.mouse() method.
27. ____ is commonly used to create data visualizations and other static or interactive visuals.
- SVG
- Canvas
- Bitmap
- XML
Answer: A) SVG
Explanation:
SVG is commonly used to create data visualizations and other static or interactive visuals.
28. Canvas is recommended for producing dynamic visuals such as games and animations.
- SVG
- Canvas
- Bitmap
- XML
Answer: B) Canvas
Explanation:
Canvas is recommended for producing dynamic visuals such as games and animations.
29. ____, is a low-level graphics API that allows for bitmap drawing.
- SVG
- Canvas
- Bitmap
- XML
Answer: B) Canvas
Explanation:
Canvas, is a low-level graphics API that allows for bitmap drawing.
30. Canvas is ____.
- Stateless
- Statefull
- Both
- None
Answer: A) Stateless
Explanation:
Canvas is stateless.