New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@types/d3-hexbin

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/d3-hexbin - npm Package Compare versions

Comparing version

to
0.2.3

90

d3-hexbin/index.d.ts
// Type definitions for D3JS d3-hexbin module 0.2
// Project: https://github.com/d3/d3-hexbin/
// Definitions by: UNCOVER TRUTH Inc. <https://github.com/uncovertruth>, Tom Wanzek <https://github.com/tomwanzek>
// Definitions by: UNCOVER TRUTH Inc. <https://github.com/uncovertruth>
// Tom Wanzek <https://github.com/tomwanzek>
// denisname <https://github.com/denisname>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// Last module patch version validated against: 0.2.1
// Last module patch version validated against: 0.2.2
export interface HexbinBin<T> extends Array<T> {
/**
* The x-coordinate of the center of the associated bin’s hexagon.
*/
x: number;
/**
* The y-coordinate of the center of the associated bin’s hexagon.
*/
y: number;

@@ -18,3 +28,3 @@ }

* invoked to compute the x- and y-coordinates of the point, which is then
* used to determine which hexagonal bin to add the point.
* used to assign the point to a hexagonal bin.
* If either the x- or y-coordinate is NaN, the point is ignored and will

@@ -51,4 +61,3 @@ * not be in any of the returned bins.

/**
* If x is specified, sets the x-coordinate accessor to the specified
* function and returns this hexbin generator.
* Sets the x-coordinate accessor to the specified function and returns this hexbin generator.
*

@@ -59,17 +68,10 @@ * The x-coordinate accessor is used by hexbin to compute the x-coordinate

*/
x(x: (d: T) => number): Hexbin<T>;
x(x: (d: T) => number): this;
/**
* If x is not specified, returns the current x-coordinate accessor,
* Returns the current x-coordinate accessor, which defaults to: `x(d) => d[0]`.
*
* which defaults to:
*
* function x(d) {
* return d[0];
* }
*
* The x-coordinate accessor is used by hexbin to compute the x-coordinate
* of each point. The default value assumes each point is specified as
* a two-element array of numbers [x, y].
*
*/

@@ -79,4 +81,3 @@ x(): (d: T) => number;

/**
* If y is specified, sets the y-coordinate accessor to the specified
* function and returns this hexbin generator.
* Sets the y-coordinate accessor to the specified function and returns this hexbin generator.
*

@@ -87,13 +88,7 @@ * The y-coordinate accessor is used by hexbin to compute the y-coordinate

*/
y(y: (d: T) => number): Hexbin<T>;
y(y: (d: T) => number): this;
/**
* If y is not specified, returns the current y-coordinate accessor,
* Returns the current y-coordinate accessor, which defaults to: `y(d) => d[1]`.
*
* which defaults to:
*
* function y(d) {
* return d[1];
* }
*
* The y-coordinate accessor is used by hexbin to compute the y-coordinate

@@ -106,4 +101,3 @@ * of each point. The default value assumes each point is specified as

/**
* If radius is specified, sets the radius of the hexagon to
* the specified number.
* Sets the radius of the hexagon to the specified number.
*

@@ -114,7 +108,6 @@ * The hexagons are pointy-topped (rather than flat-topped);

*/
radius(radius: number): Hexbin<T>;
radius(radius: number): this;
/**
* If radius is not specified, returns the current radius,
* which defaults to 1.
* Returns the current radius, which defaults to 1.
*

@@ -128,21 +121,40 @@ * The hexagons are pointy-topped (rather than flat-topped);

/**
* If extent is specified, sets the hexbin generator’s extent to the
* specified bounds [[x0, y0], [x1, y1]] and returns the hexbin generator.
* Sets the hexbin generator’s extent to the specified bounds
* `[[x0, y0], [x1, y1]]` and returns the hexbin generator.
*/
extent(extent: [[number, number], [number, number]]): Hexbin<T>;
extent(extent: [[number, number], [number, number]]): this;
/**
* If extent is not specified, returns the generator’s current
* extent [[x0, y0], [x1, y1]], where x0 and y0 are the lower bounds and
* x1 and y1 are the upper bounds.
* Returns the generator’s current extent `[[x0, y0], [x1, y1]]`,
* where `x0` and `y0` are the lower bounds and `x1` and `y1` are the upper bounds.
*
* The extent defaults to [[0, 0], [1, 1]].
* The extent defaults to `[[0, 0], [1, 1]]`.
*/
extent(): [[number, number], [number, number]];
/**
* Sets the extent to the specified bounds `[[0, 0], [dx, dy]]` and returns the hexbin generator.
*
* This is a convenience method for setting the extent.
*/
size(size: [number, number]): this;
/**
* Returns the generator’s current size `[x1 - x0, y1 - y0]`,
* where `x0` and `y0` are the lower bounds and `x1` and `y1` are the upper bounds.
*
* The size defaults to [1, 1].
*/
size(): [number, number];
}
/**
* Constructs a new default hexbin generator.
* Creates a new hexbin generator with default radius, extent, x- and y- accessors.
* The x- and y-accessors may have to be set to correspond to the data type provided
* by the generic.
*
* The generic refers to the type of the data for the corresponding element.
* Without specifying a generic the layout is assumed to be based on data represented
* by a two-dimensional coordinate `[number, number]` for x- and y-coordinate, respectively.
*/
export function hexbin(): Hexbin<[number, number]>;
export function hexbin<T>(): Hexbin<T>;
export function hexbin<T = [number, number]>(): Hexbin<T>;
{
"name": "@types/d3-hexbin",
"version": "0.2.2",
"version": "0.2.3",
"description": "TypeScript definitions for D3JS d3-hexbin module",

@@ -16,2 +16,7 @@ "license": "MIT",

"githubUsername": "tomwanzek"
},
{
"name": "denisname",
"url": "https://github.com/denisname",
"githubUsername": "denisname"
}

@@ -22,8 +27,8 @@ ],

"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "eedea04c9c116e6195837ec2b18268db97b99d36fde673e7291c70258fbebc53",
"typeScriptVersion": "2.0"
"typesPublisherContentHash": "9d1b2572fe653cf9bddda98649b9fc9bb615d09d5bfed49415878ec41df13e6d",
"typeScriptVersion": "2.3"
}

@@ -8,6 +8,6 @@ # Installation

# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-hexbin
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-hexbin
Additional Details
* Last updated: Thu, 26 Apr 2018 22:06:52 GMT
* Last updated: Sat, 08 Sep 2018 01:20:16 GMT
* Dependencies: none

@@ -17,2 +17,2 @@ * Global values: none

# Credits
These definitions were written by UNCOVER TRUTH Inc. <https://github.com/uncovertruth>, Tom Wanzek <https://github.com/tomwanzek>.
These definitions were written by UNCOVER TRUTH Inc. <https://github.com/uncovertruth>, Tom Wanzek <https://github.com/tomwanzek>, denisname <https://github.com/denisname>.

Sorry, the diff of this file is not supported yet