Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@visx/glyph

Package Overview
Dependencies
Maintainers
4
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@visx/glyph

visx glyph

  • 3.12.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
198K
increased by6.26%
Maintainers
4
Weekly downloads
 
Created

What is @visx/glyph?

@visx/glyph is a part of the VisX library, which provides a collection of low-level visualization components for building custom visualizations in React. The @visx/glyph package specifically focuses on rendering various types of glyphs (shapes) such as circles, lines, and custom SVG paths, which can be used to represent data points in a visualization.

What are @visx/glyph's main functionalities?

Circle Glyph

This feature allows you to render a circle glyph at a specified position with a given size and color. The example demonstrates how to create a blue circle glyph centered at (250, 250) with a size of 100.

import { GlyphCircle } from '@visx/glyph';

const CircleGlyphExample = () => (
  <svg width={500} height={500}>
    <GlyphCircle left={250} top={250} size={100} fill="blue" />
  </svg>
);

Line Glyph

This feature allows you to render line glyphs, which are essentially dots that can be connected to form lines. The example demonstrates how to create three dots at different positions with different colors.

import { GlyphDot } from '@visx/glyph';

const LineGlyphExample = () => (
  <svg width={500} height={500}>
    <GlyphDot left={100} top={100} size={50} fill="red" />
    <GlyphDot left={200} top={200} size={50} fill="green" />
    <GlyphDot left={300} top={300} size={50} fill="blue" />
  </svg>
);

Custom SVG Path Glyph

This feature allows you to render custom SVG path glyphs. The example demonstrates how to create a custom path glyph with a specified SVG path string.

import { Glyph } from '@visx/glyph';

const CustomPathGlyphExample = () => (
  <svg width={500} height={500}>
    <Glyph top={250} left={250} size={100} fill="purple">
      {({ path }) => (
        <path d={path('M10 10 H 90 V 90 H 10 Z')} />
      )}
    </Glyph>
  </svg>
);

Other packages similar to @visx/glyph

Keywords

FAQs

Package last updated on 07 Nov 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc