Socket
Socket
Sign inDemoInstall

textures

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

textures

SVG patterns for Data Visualization


Version published
Weekly downloads
2.7K
decreased by-13.77%
Maintainers
2
Weekly downloads
 
Created
Source

textures.js

Textures.js is a JavaScript library for creating SVG patterns. Made on top of d3.js, it is designed for data visualization.

Read more on http://riccardoscalco.github.io/textures/.

Install

npm install textures

Usage

Import textures.js from NPM with:

import textures from 'textures';

You can also use textures.js in your HTML page with a <script> tag by downloading textures.js to a local folder:

<script src="path/to/textures.js"></script>

or by using the Unpkg CDN network:

<script src="https://unpkg.com/textures@1.2.0/dist/textures.js"></script>

Then textures.js can be used alongside d3 with:

const svg = d3
  .select('#example')
  .append("svg");

const texture = textures
  .lines()
  .thicker();

svg.call(texture);

svg
  .append('circle')
  .style('fill', texture.url());

License

MIT

Keywords

FAQs

Package last updated on 17 Apr 2021

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