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.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.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.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.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.

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

lagrange.spacing()

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

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.

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.filter()

interval.filter(test) Returns a new interval that is a filtered subset of this interval using the specified test function. The test function is passed a date and should return true if and only if the specified date should be considered part of the interval. For example, to create an interval that returns the 1st, 11th, 21th and 31th (if it exists) of each month: var i = d3.timeDay.filter(function(d) { return (d.getDate() - 1) % 10 === 0; }); The returned filtered interval does not support co