Socket
Socket
Sign inDemoInstall

@visx/glyph

Package Overview
Dependencies
15
Maintainers
4
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @visx/glyph

visx glyph


Version published
Weekly downloads
191K
increased by4.35%
Maintainers
4
Created
Weekly downloads
 

Package description

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

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/glyph

Glyphs are small marks or symbols that you can use in your charts. Example: https://airbnb.io/visx/glyphs

Installation

npm install --save @visx/glyph

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc