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

dmn-elex-historical-share

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dmn-elex-historical-share

<img style="width:60px; transform: rotate(15deg); margin-left: 10px; margin-bottom:30px;" src="http://elections.dallasn

  • 1.0.0
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

dmn-elex-historical-share

Chart module comparing Donald Trump's vote margin in Texas to previous republican presidential candidates with smart text.

Install

$ npm install --save dmn-elex-historical-share
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, historicalShare:

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

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

import historicalShare from 'dmn-elex-historical-share';

The chart object has two methods, one to create the chart, initially, and another to update it.

var myChart = new historicalShare();

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

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

The data is expected to be the complete results for U.S. president.

Positioning and styles

This chart should be in a container with a fixed height of 185px and a set style position: relative;. Position the container absolutely at the top or bottom of any containing div for more control. The chart will expand with the width of its container, but it's ideal range is between 250px and 320px.

Be sure to grab styles for this chart in styles.scss.

Hosted images

This chart requires two hosted images:

Developing

Just run gulp:

$ gulp

Or to minimize javascript before publishing:

$ gulp --production

FAQs

Package last updated on 23 Oct 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