Socket
Socket
Sign inDemoInstall

@visx/point

Package Overview
Dependencies
0
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @visx/point

visx point


Version published
Weekly downloads
511K
increased by0.45%
Maintainers
4
Install size
6.63 kB
Created
Weekly downloads
 

Changelog

Source

v3.3.0 (2023-07-11)

:rocket: Enhancements
  • Create new @visx/delaunay package #1678
:bug: Bug Fix
  • Fix glyph positioning in the xychart demo. #1730
:trophy: Contributors

Readme

Source

@visx/point

A simple class to represent an x, y coordinate.

Installation

npm install --save @visx/point

Example Usage

import { Point } from '@visx/point';

const point = new Point({ x: 2, y: 3 });
const { x, y } = point.value(); // Get the coords as an object
const [x, y] = point.toArray(); // or array

Methods

point.value()

Returns an { x, y } object with the x and y coordinates.

point.toArray()

Returns the coordinates as an array [x, y].

Keywords

FAQs

Last updated on 11 Jul 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc