Visx Flashcards

1
Q

Domain

A

The set of possible output values, which are shown on the y-axis

Generally this is the Min and Max values in the data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Range

A

all the input values shown on the y-axis

Generally this is 0 to width of the graph

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

D3 Scale

A

A function which accepts input within the domain and maps it to output within the range.

You can use the function to calculate positions based on the data:
Domain: 0-10
Range: 0-600

myScale(0);   // returns 0
myScale(2);   // returns 120
myScale(3);   // returns 180
...
myScale(10);  // returns 600
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are scale functions used for?

A

Scales are mainly used for transforming data values to visual variables such as position, length and colour

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Linear scale

A

Linear scale functions are typically used to transform data values into positions and lengths. They are useful when creating bar charts, line charts and many other chart types.
the range can also be specified as colours:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Square Root scale

A

creates a square-root based scale. It transforms its domain in such a way that if the value b is 4 times bigger than value a, the result is only multiplied by 2.

Its most common use case is to determine the radius of a disk whose surface area must be proportional to the value (useful for sizing circles by area)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Band scale

A

Band scales are like ordinal scales except the output range is continuous and numeric. Discrete output values are automatically computed by the scale by dividing the continuous range into uniform bands. Band scales are typically used for bar charts with an ordinal or categorical dimension

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Log scale

A

creates a logarithmic scale, a continuous scale in which the domain is transformed by the Math.log function

a log scale domain must be strictly-positive or strictly-negative; the domain must not include or cross zero.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Radial scale

A

Radial scales are a variant of linear scales where the range is internally squared so that an input value corresponds linearly to the squared output value. These scales are useful when you want the input value to correspond to the area of a graphical mark and the mark is specified by radius, as in a radial bar chart

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Ordinal scale

A

ordinal scales have a discrete domain and range

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Point scale

A

Point scales are a variant of band scales with the bandwidth fixed to zero. Point scales are typically used for scatterplots with an ordinal or categorical dimension

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Power scale

A

creates a power based scale.

The transform applied to values is of the type y = x^k where k, the exponent, can be any real number.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Time scale

A

Time scales are commonly used for charts where one axis represents the time or date. Line charts, bar charts, you name it. If a dimension of the data is expressed as Date objects, you will probably use d3.scaleTime instead of d3.scaleLinear to represent it on screen

The default domain is one full day, the 1st of January, 2000, in the local time zone (as set in the user’s environment, for example their browser).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

axis component

A

consists of a line with ticks, tick labels, and an axis label that helps viewers interpret your graph.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what are the 5 different Axis components?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

@visx/curve package

A

functions that can be passed to other visx components to change the way the line is drawn

17
Q

@visx/grid package

A

lets you create gridlines for charts