npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@df-legacy/ng-epoch

v1.0.8

Published

Angular directive wrapper for EpochJS, a charting plugin by Fastly.

Downloads

2

Readme

ng-epoch

... is an AngularJS directive wrapper for the Epoch. The creation of this set of directives stemmed from the need for a simple set of charts where each chart could have data fed to it via AngularJS. I first looked for a decent charting module for Angular and couldn't find one that satisfied the client needs. That's when I stumbled upon Epoch.

Requirements

First, it should be obvious that ng-epoch will depend on Epoch and any of it's dependencies. Keep this in mind should you choose to install manually. Please read the installation instructions on the Epoch project site for further help. Other than that, ng-epoch only requires AngularJS 1.2+.

Installation

Automated installation via Bower

bower install ng-epoch

This will download the latest version of ng-epoch and it's dependencies into your project. Those dependencies are:

Important: When including the libraries in your page, ensure that D3 is loaded before Epoch.

Manual Installation (Old Skool style)

Visit each of the project sites listed above and download their packages and unarchive them into your project directory. Then proceed to the Preparation steps below.

Manual Installation (Hardcore Parkour style)

If you can locate CDN sources for each of the above listed libraries, and you prefer CDN distributions, then identify the URLs for the libraries you can, download the source packages you can't find CDNs for applying the Old Skool method above, and finally proceed to the Preparation steps below.

Preparation

In the head of your page, include the base stylesheet. Instructions for customizing chart styles is available on the Epoch Project Site.

<link rel="stylesheet" href="[PATH_TO_BOWER_COMPNENTS]/epoch/epoch.min.css" />

Then, where you load your javascript sources, add the following sources.

If you do not already have jQuery and AngularJS included:

<script src="[PATH_TO_BOWER_COMPNENTS]/jquery/dist/jquery.min.js"></script>
<script src="[PATH_TO_BOWER_COMPNENTS]/angular/angular.min.js"></script>

After you load those two libraries, include:

<script src="[PATH_TO_BOWER_COMPNENTS]/d3/d3.min.js"></script>
<script src="[PATH_TO_BOWER_COMPNENTS]/epoch/epoch.min.js"></script>
<script src="[PATH_TO_BOWER_COMPNENTS]/ng-epoch/ng-epoch.js"></script>

To ensure proper functionality, make sure that the sources are loaded in this general order.

Implementation

Now for the fun part... create a chart. Unfortunately, I haven't gotten this far in documenting this little gem. I will update this readme when I have a little more time. I am also working on a gh-pages. In the meantime, I will refer you to the testpage.html under the example directory and say "Good luck. Kirk, out."

Copyright / Legal

I claim no copyright for any of the supporting libraries. Please refer to their copyright notices for usage and restrictions.

In regards to the ng-epoch source, I'm keeping it kindergarten.

  • If you like it, use it.
  • If you don't like it, don't use it.
  • If you make or have suggestions for improvements, share please.