Skip to content

Commit

Permalink
docs: update source links
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwalley committed May 14, 2023
1 parent 5e96c70 commit 19717bd
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions README.md
Expand Up @@ -173,55 +173,55 @@ The orientation of a slider is fixed; to change the orientation, remove the old

All sliders may take a [scale](https://github.com/d3/d3-scale) as an argument. If _scale_ is specified, the slider will use the scale to render the slider. This must be either [scaleLinear](https://github.com/d3/d3-scale#scaleLinear) or [scaleTime](https://github.com/d3/d3-scale#scaleTime). The domain will be used to calculate minimum and maximum values. The range will be used to calculate the width or height of the slider. This means you do not need to set these if passing a scale.

<a name="sliderHorizontal" href="#sliderHorizontal">#</a> d3.<b>sliderHorizontal</b>([<i>scale</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L827 'Source')
<a name="sliderHorizontal" href="#sliderHorizontal">#</a> d3.<b>sliderHorizontal</b>([<i>scale</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L859 'Source')

Constructs a new horizontal slider generator. _Note that this is equivalent to [`sliderBottom`](#sliderBottom)._

<a name="sliderVertical" href="#sliderVertical">#</a> d3.<b>sliderVertical</b>([<i>scale</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L832 'Source')
<a name="sliderVertical" href="#sliderVertical">#</a> d3.<b>sliderVertical</b>([<i>scale</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L863 'Source')

Constructs a new vertical slider generator. _Note that this is equivalent to [`sliderLeft`](#sliderLeft)._

<a name="sliderTop" href="#sliderTop">#</a> d3.<b>sliderTop</b>([<i>scale</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L835 'Source')
<a name="sliderTop" href="#sliderTop">#</a> d3.<b>sliderTop</b>([<i>scale</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L867 'Source')

Constructs a new horizontal slider generator. Ticks on top.

<a name="sliderRight" href="#sliderRight">#</a> d3.<b>sliderRight</b>([<i>scale</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L839 'Source')
<a name="sliderRight" href="#sliderRight">#</a> d3.<b>sliderRight</b>([<i>scale</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L839 'Source')

Constructs a new vertical slider generator. Ticks to the right;

<a name="sliderBottom" href="#sliderBottom">#</a> d3.<b>sliderBottom</b>([<i>scale</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L843 'Source')
<a name="sliderBottom" href="#sliderBottom">#</a> d3.<b>sliderBottom</b>([<i>scale</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L871 'Source')

Constructs a new horizontal slider generator. Ticks on the bottom.

<a name="sliderLeft" href="#sliderLeft">#</a> d3.<b>sliderLeft</b>([<i>scale</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L47 'Source')
<a name="sliderLeft" href="#sliderLeft">#</a> d3.<b>sliderLeft</b>([<i>scale</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L879 'Source')

Constructs a new vertical slider generator. Ticks to the left;

<a name="_slider" href="#_slider">#</a> <i>slider</i>(<i>context</i>) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L30 'Source')
<a name="_slider" href="#_slider">#</a> <i>slider</i>(<i>context</i>) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L30 'Source')

Render the slider to the given _context_, which may be either a [selection](https://github.com/d3/d3-selection) of SVG containers (either SVG or G elements) or a corresponding [transition](https://github.com/d3/d3-transition).

<a name="slider_ticks" href="#slider_ticks">#</a> <i>slider</i>.<b>ticks</b>([<i>count</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L697 'Source')
<a name="slider_ticks" href="#slider_ticks">#</a> <i>slider</i>.<b>ticks</b>([<i>count</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L729 'Source')

To generate twenty ticks:

```js
slider.ticks(20);
```

<a name="slider_tickValues" href="#slider_tickValues">#</a> <i>slider</i>.<b>tickValues</b>([<i>values</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L783 'Source')
<a name="slider_tickValues" href="#slider_tickValues">#</a> <i>slider</i>.<b>tickValues</b>([<i>values</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L815 'Source')

If a values array is specified, the specified values are used for ticks rather than using the sliders' automatic tick generator. If values is null, clears any previously-set explicit tick values and reverts back to the sliders' tick generator. If values is not specified, returns the current tick values, which defaults to null. For example, to generate ticks at specific values:

```js
slider.tickValues([1, 2, 3, 5, 8, 13, 21]);
```

<a name="slider_tickPadding" href="#slider_tickPadding">#</a> <i>slider</i>.<b>tickPadding</b>([<i>padding</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L789 'Source')
<a name="slider_tickPadding" href="#slider_tickPadding">#</a> <i>slider</i>.<b>tickPadding</b>([<i>padding</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L821 'Source')

If _padding_ is specified, sets the padding to the specified value in pixels and returns the axis. If _padding_ is not specified, returns the current padding which defaults to 3 pixels.

<a name="slider_tickFormat" href="#slider_tickFormat">#</a> <i>slider</i>.<b>tickFormat</b>([<i>format</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L685 'Source')
<a name="slider_tickFormat" href="#slider_tickFormat">#</a> <i>slider</i>.<b>tickFormat</b>([<i>format</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L717 'Source')

If _format_ is specified, sets the tick format function and returns the slider. If _format_ is not specified, returns the current format function, which defaults to null. A null format indicates that the slider's default formatter should be used.

Expand All @@ -231,7 +231,7 @@ See [d3-format](https://github.com/d3/d3-format) and [d3-time-format](https://gi
slider.tickFormat(d3.format(',.0f'));
```

<a name="slider_displayFormat" href="#slider_displayFormat">#</a> <i>slider</i>.<b>displayFormat</b>([<i>format</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L691 'Source')
<a name="slider_displayFormat" href="#slider_displayFormat">#</a> <i>slider</i>.<b>displayFormat</b>([<i>format</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L723 'Source')

If _format_ is specified, sets the function used to format the highlighted value and returns the slider. If _format_ is not specified, returns the current format function, which defaults to null. A null format indicates that the tickFormat should be used. If tickFormat is null then the slider's default formatter should be used.

Expand All @@ -241,63 +241,63 @@ See [d3-format](https://github.com/d3/d3-format) and [d3-time-format](https://gi
slider.displayFormat(d3.format(',.0f'));
```

<a name="slider_value" href="#slider_value">#</a> <i>slider</i>.<b>value</b>([<i>value</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L703 'Source')
<a name="slider_value" href="#slider_value">#</a> <i>slider</i>.<b>value</b>([<i>value</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L735 'Source')

If _value_ is specified, sets the value of the slider to the specified value and returns the slider. If _value_ is not specified, returns the current value.

If _value_ is an array of length two then the values represent a range.

<a name="slider_silentValue" href="#slider_silentValue">#</a> <i>slider</i>.<b>silentValue</b>([<i>value</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L730 'Source')
<a name="slider_silentValue" href="#slider_silentValue">#</a> <i>slider</i>.<b>silentValue</b>([<i>value</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L762 'Source')

If _value_ is specified, sets the value of the slider to the specified value and returns the slider _without_ invoking any listeners. If _value_ is not specified, returns the current value.

If _value_ is an array of length two then the values represent a range.

<a name="slider_displayValue" href="#slider_displayValue">#</a> <i>slider</i>.<b>displayValue</b>([<i>value</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L807 'Source')
<a name="slider_displayValue" href="#slider_displayValue">#</a> <i>slider</i>.<b>displayValue</b>([<i>value</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L839 'Source')

If _value_ is specified, sets the whether the highlighted value of the slider should be shown and returns the slider. If _value_ is not specified, returns the current value, which defaults to true.

<a name="slider_handle" href="#slider_handle">#</a> <i>slider</i>.<b>handle</b>([<i>value</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L801 'Source')
<a name="slider_handle" href="#slider_handle">#</a> <i>slider</i>.<b>handle</b>([<i>value</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L833 'Source')

If _value_ is specified, sets the [SVG path definition](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d) used to render the slider handle and returns the slider. If _value_ is not specified, returns the current value, which defaults to 'M-5.5,-5.5v10l6,5.5l6,-5.5v-10z'.

<a name="slider_width" href="#slider_width">#</a> <i>slider</i>.<b>width</b>([<i>size</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L663 'Source')
<a name="slider_width" href="#slider_width">#</a> <i>slider</i>.<b>width</b>([<i>size</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L695 'Source')

If _size_ is specified, sets the width of the slider to the specified value and returns the slider. If _size_ is not specified, returns the current width, which defaults to 100. This property only affects horizontal sliders and is ignored otherwise.

<a name="slider_height" href="#slider_height">#</a> <i>slider</i>.<b>height</b>([<i>size</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L674 'Source')
<a name="slider_height" href="#slider_height">#</a> <i>slider</i>.<b>height</b>([<i>size</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L706 'Source')

If _size_ is specified, sets the height of the slider to the specified value and returns the slider. If _size_ is not specified, returns the current height, which defaults to 100. This property only affects vertical sliders and is ignored otherwise.

<a name="slider_min" href="#slider_min">#</a> <i>slider</i>.<b>min</b>([<i>value</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L630 'Source')
<a name="slider_min" href="#slider_min">#</a> <i>slider</i>.<b>min</b>([<i>value</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L662 'Source')

If _value_ is specified, sets the minimum value of the slider to the specified value and returns the slider. If _value_ is not specified, returns the current minimum value, which defaults to 0.

<a name="slider_max" href="#slider_max">#</a> <i>slider</i>.<b>max</b>([<i>value</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L641 'Source')
<a name="slider_max" href="#slider_max">#</a> <i>slider</i>.<b>max</b>([<i>value</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L673 'Source')

If _value_ is specified, sets the maximum value of the slider to the specified value and returns the slider. If _value_ is not specified, returns the current maximum value, which defaults to 10.

<a name="slider_domain" href="#slider_domain">#</a> <i>slider</i>.<b>domain</b>([<i>value</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L652 'Source')
<a name="slider_domain" href="#slider_domain">#</a> <i>slider</i>.<b>domain</b>([<i>value</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L684 'Source')

If _value_ is specified, an array which sets the minimum and maximum values of the slider and returns the slider. If _value_ is not specified, returns the current maximum value, which defaults to [0, 10].

<a name="slider_fill" href="#slider_fill">#</a> <i>slider</i>.<b>fill</b>([<i>color</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L813 'Source')
<a name="slider_fill" href="#slider_fill">#</a> <i>slider</i>.<b>fill</b>([<i>color</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L845 'Source')

If _color_ is specified, sets the color of the slider track-fill and returns the slider. If _color_ is not specified, returns the current value, which defaults to null.

<a name="slider_step" href="#slider_step">#</a> <i>slider</i>.<b>step</b>([<i>value</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L777 'Source')
<a name="slider_step" href="#slider_step">#</a> <i>slider</i>.<b>step</b>([<i>value</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L809 'Source')

If _value_ is specified, sets the increment which the slider will move in and returns the slider. If _value_ is not specified, returns the current value, which defaults to null.

<a name="slider_marks" href="#slider_marks">#</a> <i>slider</i>.<b>marks</b>([<i>value</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L795 'Source')
<a name="slider_marks" href="#slider_marks">#</a> <i>slider</i>.<b>marks</b>([<i>value</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L827 'Source')

If _value_ is specified, sets the values to which the slider will snap to and returns the slider. If _value_ is not specified, returns the current value, which defaults to null.

<a name="slider_default" href="#slider_default">#</a> <i>slider</i>.<b>default</b>([<i>value</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L757 'Source')
<a name="slider_default" href="#slider_default">#</a> <i>slider</i>.<b>default</b>([<i>value</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L789 'Source')

If _value_ is specified, sets the initial value of the slider and returns the slider. If _value_ is not specified, returns the current value, which defaults to null.

<a href="#slider_on" name="slider_on">#</a> <i>slider</i>.<b>on</b>(<i>typenames</i>, [<i>listener</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L819 'Source')
<a href="#slider_on" name="slider_on">#</a> <i>slider</i>.<b>on</b>(<i>typenames</i>, [<i>listener</i>]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/main/src/slider.js#L851 'Source')

If _listener_ is specified, sets the event _listener_ for the specified _typenames_ and returns the slider. If an event listener was already registered for the same type and name, the existing listener is removed before the new listener is added. If _listener_ is null, removes the current event listeners for the specified _typenames_, if any. If _listener_ is not specified, returns the first currently-assigned listener matching the specified _typenames_, if any. When a specified event is dispatched, each _listener_ will be invoked with the same context and arguments as [_selection_.on](https://github.com/d3/d3-selection#selection_on) listeners: the current datum `d` and index `i`, with the `this` context as the current DOM element.

Expand Down

0 comments on commit 19717bd

Please sign in to comment.