line.y()

line.y([y]) If y is specified, sets the y accessor to the specified function or number and returns this line generator. If y is not specified, returns the current y accessor, which defaults to: function y(d) { return d[1]; } When a line is generated, the y accessor will be invoked for each defined element in the input data array, being passed the element d, the index i, and the array data as three arguments. The default y accessor assumes that the input data are two-element arrays of numbe

line.x()

line.x([x]) If x is specified, sets the x accessor to the specified function or number and returns this line generator. If x is not specified, returns the current x accessor, which defaults to: function x(d) { return d[0]; } When a line is generated, the x accessor will be invoked for each defined element in the input data array, being passed the element d, the index i, and the array data as three arguments. The default x accessor assumes that the input data are two-element arrays of numbe

line.defined()

line.defined([defined]) If defined is specified, sets the defined accessor to the specified function or boolean and returns this line generator. If defined is not specified, returns the current defined accessor, which defaults to: function defined() { return true; } The default accessor thus assumes that the input data is always defined. When a line is generated, the defined accessor will be invoked for each element in the input data array, being passed the element d, the index i, and the

line.curve()

line.curve([curve]) If curve is specified, sets the curve factory and returns this line generator. If curve is not specified, returns the current curve factory, which defaults to curveLinear.

line.context()

line.context([context]) If context is specified, sets the context and returns this line generator. If context is not specified, returns the current context, which defaults to null. If the context is not null, then the generated line is rendered to this context as a sequence of path method calls. Otherwise, a path data string representing the generated line is returned.

line()

line(data) Generates a line for the given array of data. Depending on this line generator’s associated curve, the given input data may need to be sorted by x-value before being passed to the line generator. If the line generator has a context, then the line is rendered to this context as a sequence of path method calls and this function returns void. Otherwise, a path data string is returned.

lagrange.spacing()

lagrange.spacing([spacing]) Defaults to 0.5.

json2dsv

json2dsv [options…] [file] Converts the specified JSON input file to DSV. If file is not specified, defaults to reading from stdin. For example, to convert to JSON to CSV: json2csv < example.json > example.csv Or to convert a newline-delimited JSON stream to CSV: json2csv -n < example.ndjson > example.csv

interval.round()

interval.round(date) Returns a new date representing the closest interval boundary date to date. For example, timeDay.round(date) typically returns 12:00 AM local time on the given date if it is on or before noon, and 12:00 AM of the following day if it is after noon. This method is idempotent: if the specified date is already rounded to the current interval, a new date with an identical time is returned.

interval.range()

interval.range(start, stop[, step]) Returns every an array of dates representing every interval boundary after or equal to start (inclusive) and before stop (exclusive). If step is specified, then every stepth boundary will be returned; for example, for the timeDay interval a step of 2 will return every other day. If step is not an integer, it is floored. The first date in the returned array is the earliest boundary after or equal to start; subsequent dates are offset by step intervals and f