0.3.8 • Published 4 years ago

vue-histogram-slider v0.3.8

Weekly downloads
421
License
GPL-3.0
Repository
github
Last release
4 years ago

🚀 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 vue-histogram-slider

npm

npm i vue-histogram-slider

🔧 Usage

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

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

📋 Props

PropertyTypeDefaultDescription
minnumber1Set slider minimum value
maxnumber100Set slider maximum value
dataarray-Data for histogram
blockbooleanfalseLocks slider and makes it inactive
gridbooleantrueEnables grid of values.
gridNumnumber4Number of grid units.
stepnumber1Set sliders step. Always > 0. Could be fractional.
hideMinMaxbooleantrueHides min and max labels
hideFromTobooleanfalseHides from and to labels
toFixedbooleanfalseFix position of right handle.
fromFixedbooleanfalseFix position of left (or single) handle.
forceEdgesbooleanfalseSlider will be always inside it's container.
dragIntervalbooleanfalseAllow user to drag whole range. Only in double type
keyboardbooleantrueActivates keyboard controls. Move left: ←, ↓, A, S. Move right: →, ↑, W, D.
typestringdoubleChoose slider type, could be single - for one handle, or double for two handles
widthnumber600width of dialog
barHeightnumber100Set max histogram bar height
barWidthnumber6Set histogram bar width
barGapnumber5Set histogram bar gap
barRadiusnumber4Set histogram bar radius
prettifyfunctionnullSet 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.
lineHeightnumber6Set slider line height
transitionDurationnumber100Set duration to histogram bars
primaryColorstring#0091ffPrimary color
labelColorstring#0091ffLabel color
holderColorstring#dee4ecHolder color
handleColorstring#ffffffSlider handle color
gridTextColorstringsilverPrimary color
fontFamilystring'Arial, sans-serif'Set text font family
fontSizenumber12Set text font size
handleSizenumber26Slider handle size
histSliderGapnumber6Set gap between slider and histogram
updateColorOnChangebooleantrueUpdate histogram bar color on change (recommended false for performance)

🔧 Event

NameDescription
startTriggers when slider start.
changeTriggers when each values change.
updateTriggers when slider is modified by external methods update or reset.
finishTriggers when user releases handle.
0.3.8

4 years ago

0.3.7

4 years ago

0.3.6

4 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago