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

dmn-elex-poll-closing-time-list

Package Overview
Dependencies
Maintainers
4
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dmn-elex-poll-closing-time-list

A chart module for 2016 general-election poll closing times.

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
Maintainers
4
Weekly downloads
 
Created
Source

dmn-elex-poll-closing-time-list

Chart module for 2016 general-election poll closing times.

Install

$ npm install --save dmn-elex-poll-closing-time-list
Requirements

This module uses ES6 syntax. To use as a pre-compiled module, you'll need a compiler like babel.

Use

In the client, include the global-chart.js bundle, which defines a global chart object, PollClosingTimeList:

<script src="some/path/to/global-chart.js"></script>

To use as a module, simply import the chart object:

import PollClosingTimeList from 'dmn-elex-poll-closing-time-list';

The chart object has three methods, one to create the chart initially, one another to update it with new data and one to resize the chart.

Importantly, the update and resize functions have no effect with this static chart. They are included only to maintain a common API with all other election-related, pluggable charts from The Dallas Morning News.

var myChart = new PollClosingTimeList();

// create needs a selection string and prefectched data
myChart.create('#chart');

// update needs only new data
myChart.update();

To apply this chart's default styles when using SCSS, simply define the variable $PollClosingTimeList-container to represent the ID or class of the chart's container(s) and import the _chart-styles.scss partial.

$PollClosingTimeList-container: '#chart';

@import 'path/to/dmn-elex-poll-closing-time-list/src/scss/_chart-styles';

Developing

Write your chart code in chart.js and add custom styles to _chart-styles.scss.

Then, just run gulp:

$ gulp

Or to minimize javascript before publishing:

$ gulp --production

FAQs

Package last updated on 08 Nov 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

  • 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