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

jquery.circular-sliders

v1.0.0

Published

Add concentric circles with jquery and responsively set each value.

Downloads

4

Readme

Jquery Circular Sliders

A Jquery plugin which allows you to draw concentric responsive circular sliders.

Usage

Create a canvas(es) where you would like the sliders to go:

<canvas id="sliders" style="border:1px solid;margin: 20px;" height="300px" width="600px"></canvas>

Use jQuery to add circular sliders to the canvas area. Pass slider settings as objects in an array. Create multiple sliders or just a single slider.

$('#sliders').sliders([{step: 20, lineWidth: 15}, {name: "foo-bar"}]);

Options

Slider options:

| Name | Type | Default | Description | | --------------- | ------- | ----------------------------------- | ------------------------------------------------------ | | name | String | Slider n | Name your slider | | type | String | Plain | Pick between various types for interesting graphics at the center of the slider: 'Height', 'Weight', 'Shoe', 'Waist', and more to come | | centerX | Float | Center of canvas or previous slider | Specify the x value for the center of the slider | | centerY | Float | Center of canvas or previous slider | Specify the y value for the center of the slider | | color | String | "#0000FF" | Specify the color of the arc fill | | minValue | Float | 0 | The minimum value of your slider | | maxValue | Float | 100 | The maximum value of your slider | | value | Float | minValue | Set initial value of slider on page load | | step | Float | 10 | The amount the value is incremented | | units | String | "" | The units your value is displayed in | | priceUnits | String | "" | Adds price ('$', '€', '£' ...) before value | | radius | Float | Min(canvas.width, canvas.height) / 4 or (previous slider radius + previous slider lineWidth + default slider lineWidth) | The radius of your slider | | lineWidth | Float | 5 | The slider and arc width | | strokeColor | String | "#D3D3D3" | The color of the dashes on the slider | | ballColor | String | "#000000" | The color of the slider ball | | gradientFill | Boolean | true | Specify whether you would like the image in the center (for specified type) of the slider to fill with the slider's color as you scale the slider | | legend | Object | { display: true, font: "12px Arial", color: "#000000" } | Specify whether you would like the slider name, value and units listed in the top left corner of the canvas and the font and color which it's displayed in |

Global Options

To set options for all of your sliders, use:

$.fn.sliders.defaults.legend.font = "14px Helvetica";

Installation

Run

npm install jquery.circular-sliders

API

Access a slider with: (For multiple canvases only searches the first canvas)

var slider = $('#sliders').findSliderByName('foo-bar');

Retrieve slider attributes with:

slider.value;

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Bug reports and pull requests are welcome on GitHub at https://github.com/speterlin/jquery.circular-sliders. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The package is available as open source under the terms of the MIT License.