1.0.6 • Published 8 months ago

vue-sbchart v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Alt text

Installation

npm install vue-sbchart

Usage

A basic usage

<template>
    <div style="width: 500px; height: 230px">
        <VueSBChart :series="series" :baseValue="baseValue" :options="options" />
    </div>
</template>
import { VueSBChart } from 'vue-sbchart';
import 'vue-sbchart/dist/style.css';

const series = [
    { timestamp: 1656818225, value: 12 },
    { timestamp: 1656818226, value: 13 },
    { timestamp: 1656818227, value: 14 },
    { timestamp: 1656818228, value: 15 },
    { timestamp: 1656818229, value: 12.5 },
    { timestamp: 1656818230, value: 13 },
    { timestamp: 1656818231, value: 12 }
];
const baseValue = 13;
const options = {
    upColor: '#37eb34',
    downColor: '#eb3434',
    lineWidth: 1
};

Props

PropertyTypeDescription
seriesArrayAn array of objects containing value and UNIX timestamp properties
baseValuefloatThe base value used to calculate high and low positions
optionsObjectAn object with customization properties (see below)
interactiveBooleanShow pop-up on hover (default: true)
gridLinesBooleanEnable grid lines background (default: true)

Options

You can customize the chart by passing an object in the component's options prop (see example above) with these properties: | Property | Type | Default | Description | | ----------- | ----------- | ---- | --- | upColor | string (hex) | #008000 | Gradient and line color when value is higher than the base value | downColor | string (hex) | #ff0000 | Gradient and line color when value is less than the base value | lineWidth | Number | 1 | The line size of stroke

License

MIT © Clyde Escobidal

1.0.2

9 months ago

1.0.1

9 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

9 months ago

0.1.21

9 months ago

0.1.22

9 months ago

0.1.23

9 months ago

0.1.24

9 months ago

0.1.25

9 months ago

1.0.51

8 months ago

1.0.53

8 months ago

1.0.52

8 months ago

0.1.20

2 years ago

0.1.18

2 years ago

0.1.17

2 years ago

0.1.16

2 years ago

0.1.15

2 years ago

0.1.14

2 years ago

0.1.13

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago