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

flot-parkinglot-plugin

v1.1.1

Published

This is a plugin for flot to create the parking lot

Downloads

28

Readme

flot-parkinglot-plugin Build Status

This is a plugin for flot to enable the parking lot. With the parking lot a cursor/axis handel can be dragged fully off the edge of the graph. Once the handle is off the edge of the graph, it will show up in the respective graph parking lot corner.

Terms

Parking lot the area for off graph handles at the four corners of the graph.

Docker the container of the handles in the parking lot (at the red arrowhead).

Docker arrow indicates the orientation of the docker (at the yellow arrowhead).

Installation

The parking lot should be used with flot-cursors-plugin or flot-axishandle-plugin. The parking lot requires flot-cursors-plugin 4.x and flot-axishandle-plugin 2.x.

npm install flot-thumb-plugin flot-cursors-plugin flot-axishandle-plugin flot-parkinglot-plugin

Usage

Import JavaScript files in your page.

<!-- import the thumb plugin -->
<script type="text/javascript" src="../node_modules/flot-thumb-plugin/dist/es5/jquery.thumb.js"></script>
<!-- import the cursor plugin if needed -->
<script type="text/javascript" src="../node_modules/flot-cursors-plugin/dist/es5/jquery.flot.cursors.js"></script>
<!-- import the axis handle plugin if needed -->
<script type="text/javascript" src="../node_modules/flot-axishandle-plugin/dist/es5/jquery.flot.axishandle.js"></script>
<!-- import the parking lot plugin -->
<script type="text/javascript" src="../node_modules/flot-parkinglot-plugin/dist/es5/jquery.flot.parkinglot.js"></script>

Run the plot function and specify the parking lot in the options.

var myFlot = $.plot( $("#graph"), ...,
{
    ...
    cursors: [
        {
            mode: 'x',
            position: {
                relativeX: 0.75,
                relativeY: 0.5
            },
            showThumbs: 't'
        }
    ],
    axisHandles: [
        { orientation: 'vertical', location: 'far' }
    ],
    parkingLot: {}
    ...
});

Options

The plugin supports these options:

    parkingLot: {
        offset: 35,
        show: true
    }

offset the distance between the graph area and the parking lot. Default value is 35.

show if the parking lot is shown or hidden. Default value is true.

CSS classes

The dockers and docker arrows are the SVG elements. I predefined some CSS classes to allow the users to customize how dockers and arrows display.

parkingLot-docker describes how the docker rectangles display.

parkingLot-dockerArrow describes how the docker arrows display.

    .parkingLot-dockerArrow {
        fill: gray;
        stroke: white;
    }
    .parkingLot-docker {
        fill: none;
        stroke: black;
        stroke-width: 0.5;
    }