1.0.3 • Published 2 years ago

d3-line-range v1.0.3

Weekly downloads
2
License
BSD-3-Clause
Repository
github
Last release
2 years ago

d3-line-range v4

d3 v4 port of an interactive line chart with a confidence interval

Installing

If you use NPM, npm install d3-line-range.

API Reference

# d3.lineRange()

Constructs a new default lineRange generator.

# lineRange(data)

For example:

var data = [[1,2,3],[1,7,9],[2,7,12]]; 
var lineRange = d3.lineRange().data(data);
var parent = d3.select('body').call(lineRange);

# lineRange.layout({width:width,height:height,margin{top:top,bottom:bottom,left:left,right:right}})

If layout is specified, sets the layout and returns this lineRange generator. If layout is not specified, returns the current layout, which defaults to: {margin:{top: 100, right: 80, bottom: 100, left: 10},width:1500, height:2000}

# lineRange.duration(duration)

If duration is specified, sets the animation duration and returns this lineRange generator. If duration is not specified, returns the current duration, which defaults to: 1000

# lineRange.hide(hide)

If hide is specified, sets the hide and returns this lineRange generator. This will hide lines of a specified ID with an animation. If hide is not specified, returns the current hide, which is the hidden lines by ID, which defaults to: []

# lineRange.keys({top,middle,bottom})

If keys is specified, sets the keys and returns this lineRange generator. If keys is not specified, returns the current keys, which are the keys for the range values, which default to: {bottom:0,middle:1,top:2}