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

@dreysolano/vue-histogram-slider

v0.1.2

Published

Range slider with histogram for vue.js

Downloads

1,668

Readme

🚀 Quick Start

If you are a try and learn developer, you can start trying the vue-histogram-slider now using codesandbox.io.

📦 Installation

yarn

yarn add @dreysolano/vue-histogram-slider

npm

npm i @dreysolano/vue-histogram-slider

🔧 Usage

import Vue from 'vue'
import HistogramSlider from '@dreysolano/vue-histogram-slider'
import '@dreysolano/vue-histogram-slider/dist/histogram-slider.css'

Vue.component(HistogramSlider.name, HistogramSlider)
<HistogramSlider
    :width="600"
    :bar-height="100"
    :data="data"
/>

📋 Props

| Property | Type | Default | Description | | ------------------- | :------: | :-----------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------- | | min | number | 1 | Set slider minimum value | | max | number | 100 | Set slider maximum value | | from | number | {min} | Set left/min slider position | | to | number | {max} | Set right/max slider position | | data | array | - | Data for histogram | | block | boolean | false | Locks slider and makes it inactive | | grid | boolean | true | Enables grid of values. | | gridNum | number | 4 | Number of grid units. | | step | number | 1 | Set sliders step. Always > 0. Could be fractional. | | hideMinMax | boolean | true | Hides min and max labels | | hideFromTo | boolean | false | Hides from and to labels | | toFixed | boolean | false | Fix position of right handle. | | fromFixed | boolean | false | Fix position of left (or single) handle. | | forceEdges | boolean | false | Slider will be always inside it's container. | | dragInterval | boolean | false | Allow user to drag whole range. Only in double type | | keyboard | boolean | true | Activates keyboard controls. Move left: ←, ↓, A, S. Move right: →, ↑, W, D. | | type | string | double | Choose slider type, could be single - for one handle, or double for two handles | | width | number | 600 | width of dialog | | barHeight | number | 100 | Set max histogram bar height | | barWidth | number | 6 | Set histogram bar width | | barGap | number | 5 | Set histogram bar gap | | barRadius | number | 4 | Set histogram bar radius | | prettify | function | null | Set up your own prettify function. Can be anything. For example, you can set up unix time as slider values and than transform them to cool looking dates. | | lineHeight | number | 6 | Set slider line height | | transitionDuration | number | 100 | Set duration to histogram bars | | primaryColor | string | #0091ff | Primary color | | labelColor | string | #0091ff | Label color | | holderColor | string | #dee4ec | Holder color | | handleColor | string | #ffffff | Slider handle color | | gridTextColor | string | silver | Primary color | | fontFamily | string | 'Arial, sans-serif' | Set text font family | | fontSize | number | 12 | Set text font size | | handleSize | number | 26 | Slider handle size | | histSliderGap | number | 6 | Set gap between slider and histogram | | updateColorOnChange | boolean | true | Update histogram bar color on change (recommended false for performance) |

🔧 Event

| Name | Description | | ------ | --------------------------------------------------------------------- | | start | Triggers when slider start. | | change | Triggers when each values change. | | update | Triggers when slider is modified by external methods update or reset. | | finish | Triggers when user releases handle. |