Socket
Book a DemoInstallSign in
Socket

chartist-plugin-scale-lines-and-dots

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chartist-plugin-scale-lines-and-dots

Chartist plugin to scale lines and dots based on chart width

2.0.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

chartist-plugin-scale-lines-and-dots

Chartist plugin to scale lines and dots based on chart width.

Use Case

When there are small line charts and media queries aren't sufficient.

See demo

Install

npm install chartist-plugin-scale-lines-and-dots --save

Usage

var Chartist = require('chartist');
var scaleLinesAndDots = require('chartist-plugin-scale-lines-and-dots');

var chart = new Chartist.Line(element, data, {
  plugins: [
    scaleLinesAndDots(options)
  ]
});

options

Everything is optional including the options object itself.

{
  dot: {
    // Minimum stroke-width a dot can have, default: 8
    min: Number,
    // Maximum stroke-width a dot can have, default: 10
    max: Number,
    // Unit used for dot's stroke-width, default: 'px'
    unit: String
  },
  line: {
    // Minimum stroke-width a line can have, default: 2
    min: Number,
    // Maximum stroke-width a line can have, default: 4
    max: Number,
    // Unit used for line's stroke-width, default: 'px'
    unit: String
  },
  svgWidth: {
    // Lower threshold for chart width. When chart width is <= this
    // value, the chart's lines and dots will be at their min size.
    min: Number,
    // Upper threshold for chart width. When chart width is >= this
    // value, the chart's lines and dots will be at their max size.
    max: Number
  }
}

License

MIT

Keywords

chartist

FAQs

Package last updated on 22 May 2016

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.