All Projects â†’ derhuerst â†’ Svg Patterns

derhuerst / Svg Patterns

Licence: isc
SVG patterns for Data Visualization.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Svg Patterns

Svg Radar Chart
Generate SVG radar charts.
Stars: ✭ 45 (-77.61%)
Mutual labels:  svg, dataviz, virtual-dom
Ngx Charts
📊 Declarative Charting Framework for Angular
Stars: ✭ 4,057 (+1918.41%)
Mutual labels:  svg, dataviz
Jquery Mapael
jQuery plugin based on raphael.js that allows you to display dynamic vector maps
Stars: ✭ 981 (+388.06%)
Mutual labels:  svg, dataviz
Virtual Dom
The foundation of HTML and SVG in Elm.
Stars: ✭ 196 (-2.49%)
Mutual labels:  svg, virtual-dom
Gantt
Gantt chart library using jsx support SVG, Canvas and SSR
Stars: ✭ 148 (-26.37%)
Mutual labels:  svg, virtual-dom
Reaviz
📊 Data visualization library for React based on D3
Stars: ✭ 1,141 (+467.66%)
Mutual labels:  svg, dataviz
Amcharts4
The most advanced amCharts charting library for JavaScript and TypeScript apps.
Stars: ✭ 907 (+351.24%)
Mutual labels:  svg, dataviz
Vue D3 Workshop
Workshop content material and excercises for Suncoast Developers
Stars: ✭ 63 (-68.66%)
Mutual labels:  svg, dataviz
Nivo
nivo provides a rich set of dataviz components, built on top of the awesome d3 and React libraries
Stars: ✭ 9,550 (+4651.24%)
Mutual labels:  svg, dataviz
Picasso.js
A charting library streamlined for building interactive visualizations for the Qlik product suites.
Stars: ✭ 175 (-12.94%)
Mutual labels:  svg, dataviz
Mithril.js
A JavaScript Framework for Building Brilliant Applications
Stars: ✭ 13,062 (+6398.51%)
Mutual labels:  virtual-dom
Supertinyicons
Under 1KB each! Super Tiny Icons are miniscule SVG versions of your favourite website and app logos
Stars: ✭ 13,177 (+6455.72%)
Mutual labels:  svg
Free Gophers Pack
✨ This pack of 100+ gopher pictures and elements will help you to build own design of almost anything related to Go Programming Language: presentations, posts in blogs or social media, courses, videos and many, many more.
Stars: ✭ 2,343 (+1065.67%)
Mutual labels:  svg
Animating Vue Workshop
Animated Interfaces with Vue.js Workshop Materials
Stars: ✭ 195 (-2.99%)
Mutual labels:  svg
Chartist Js
Simple responsive charts
Stars: ✭ 12,731 (+6233.83%)
Mutual labels:  svg
Webicon
Icon library
Stars: ✭ 190 (-5.47%)
Mutual labels:  svg
Weather Underground Icons
Weather Underground Icons ( PNG & SVG )
Stars: ✭ 186 (-7.46%)
Mutual labels:  svg
Polymorph
Get Your SVG into Shape!
Stars: ✭ 185 (-7.96%)
Mutual labels:  svg
Render
UIKit a-lĂ  SwiftUI.framework [min deployment target iOS10]
Stars: ✭ 2,150 (+969.65%)
Mutual labels:  virtual-dom
Svelte Awesome
Awesome SVG icon component for Svelte JS, built with Font Awesome icons. Based on Justineo/vue-awesome
Stars: ✭ 193 (-3.98%)
Mutual labels:  svg

svg-patterns

Create SVG patterns programmatically to visualize data, to help color-blind people and because it looks nice.

npm version build status ISC-licensed minimum Node.js version chat with me on Gitter support me on Patreon

a simple pattern

This library is inspired by Textures.js but tries to do a few things differently:

  • svg-patterns does not limit you in which frontend stack you use. It just returns virtual-dom nodes.
  • Because Textures.js includes D3, it weighs 216k + 8k. svg-patterns weighs 19k.

Installing

npm install svg-patterns

Usage

svg-patterns exposes several styles, which you can customize by passing an object. The following list shows all styles, including their default options. You can fiddle with them on the website.

Getting Started

If you load a style via require('svg-patterns/p/style'), the bundle will be smaller. But you can also load it via require('svg-patterns').style.

const lines = require('svg-patterns/p/lines')
const stringify = require('virtual-dom-stringify')

const pattern = lines({
	stroke: 'darkorange',
	background: '#343434',
	orientations: [45]
})

process.stdout.write(`
	<svg xmlns="http://www.w3.org/2000/svg">
		<defs>${stringify(pattern)}</defs>
		<rect width="200" height="200" style="fill: ${pattern.url()}"/>
	</svg>
`)

a simple pattern

caps style

const defaults = {
	size: 9, // size of the pattern
	fill: 'none', // any SVG-compatible color
	strokeWidth: .9,
	stroke: '#343434', // any SVG-compatible color
	background: null // any SVG-compatible color
}

circles style

const defaults = {
	size: 15, // size of the pattern
	radius: 3,
	complement: true,
	fill: '#545454', // any SVG-compatible color
	strokeWidth: 0,
	stroke: 'none', // any SVG-compatible color
	background: null // any SVG-compatible color
}

crosses style

const defaults = {
	size: 10, // size of the pattern
	fill: 'none', // any SVG-compatible color
	strokeWidth: .8,
	stroke: '#343434', // any SVG-compatible color
	background: null // any SVG-compatible color
}

hexagons style

const defaults = {
	size: 10, // size of the pattern
	fill: 'none', // any SVG-compatible color
	strokeWidth: 1,
	stroke: '#343434', // any SVG-compatible color
	background: null // any SVG-compatible color
}

lines style

const defaults = {
	size: 8, // size of the pattern
	strokeWidth: .7,
	stroke: '#343434', // any SVG-compatible color
	background: null, // any SVG-compatible color
	orientations: [45] // can be any combination of 0, 45, -45, 90
}

nylon style

const defaults = {
	size: 15, // size of the pattern
	fill: 'none', // any SVG-compatible color
	strokeWidth: 1,
	stroke: '#343434', // any SVG-compatible color
	background: null // any SVG-compatible color
}

rhombic style

const defaults = {
	size: 12, // size of the pattern
	fill: 'none', // any SVG-compatible color
	strokeWidth: .9,
	stroke: '#343434', // any SVG-compatible color
	background: null // any SVG-compatible color
}

rhombic3d style

const defaults = {
	size: 14, // size of the pattern
	fill: 'none', // any SVG-compatible color
	strokeWidth: .6,
	stroke: '#343434', // any SVG-compatible color
	background: null // any SVG-compatible color
}

squares style

const defaults = {
	size: 10, // size of the pattern
	fill: 'none', // any SVG-compatible color
	strokeWidth: .9,
	stroke: '#343434', // any SVG-compatible color
	background: null // any SVG-compatible color
}

waves style

const defaults = {
	size: 8, // size of the pattern
	fill: 'none', // any SVG-compatible color
	strokeWidth: .8,
	stroke: '#343434', // any SVG-compatible color
	background: null // any SVG-compatible color
}

woven style

const defaults = {
	size: 9, // size of the pattern
	fill: 'none', // any SVG-compatible color
	strokeWidth: 1,
	stroke: '#343434', // any SVG-compatible color
	background: null // any SVG-compatible color
}

See also

Contributing

If you have a question or need support using svg-patterns, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, use the issues page.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].