Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dailychart

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dailychart - npm Package Compare versions

Comparing version 1.2.3 to 1.3.0

35

CHANGELOG.md

@@ -1,7 +0,25 @@

<a name="1.2.3"></a>
### 1.2.3 (2018-11-20)
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
#### Bug Fixes
## [1.3.0](https://github.com/kbychkov/dailychart/compare/v1.2.3...v1.3.0) (2019-07-19)
### Features
* introduce `create` method ([3bd9631](https://github.com/kbychkov/dailychart/commit/3bd9631)), closes [#6](https://github.com/kbychkov/dailychart/issues/6)
### Tests
* add karma test runner and travis CI ([e76a4e3](https://github.com/kbychkov/dailychart/commit/e76a4e3))
* ES6-ify tests ([deab2cc](https://github.com/kbychkov/dailychart/commit/deab2cc))
## 1.2.3 (2018-11-20)
### Bug Fixes
* rewrite `normalize` and `translate` methods ([df5602c8](https://github.com/kbychkov/dailychart.git/commit/df5602c8))

@@ -11,6 +29,5 @@ * throw the error correctly ([071843f7](https://github.com/kbychkov/dailychart.git/commit/071843f7))

<a name="1.2.0"></a>
### 1.2.0 (2018-06-21)
## 1.2.0 (2018-06-21)
#### Feature
### Features

@@ -20,8 +37,6 @@ * Added UMD wrapper

<a name="1.1.0"></a>
### 1.1.0 (2018-06-14)
## 1.1.0 (2018-06-14)
#### Feature
### Features
* Added new options: `fillPositive`, `fillNegative`
{
"name": "dailychart",
"version": "1.2.3",
"description": "Tiny SVG charting library to display daily graph of a stock market security",
"version": "1.3.0",
"description": "Tiny SVG charting library to display stock sparklines",
"homepage": "https://github.com/kbychkov/dailychart",
"main": "dist/dailychart.js",
"jsdelivr": "dist/dailychart.min.js",
"unpkg": "dist/dailychart.min.js",
"files": [
"/dist"
],
"repository": {

@@ -12,3 +17,5 @@ "type": "git",

"scripts": {
"start": "gulp"
"start": "gulp",
"build": "gulp js",
"test": "karma start"
},

@@ -18,2 +25,3 @@ "keywords": [

"graph",
"sparkline",
"svg"

@@ -24,13 +32,17 @@ ],

"devDependencies": {
"babel-core": "^6.26.3",
"babel-plugin-transform-es2015-for-of": "^6.23.0",
"babel-preset-env": "^1.7.0",
"@babel/core": "^7.5.4",
"@babel/plugin-transform-for-of": "^7.4.4",
"@babel/preset-env": "^7.5.4",
"chai": "^4.2.0",
"gulp": "^3.9.1",
"gulp-babel": "^7.0.1",
"gulp": "^4.0.2",
"gulp-babel": "^8.0.0",
"gulp-rename": "^1.4.0",
"gulp-uglify": "^3.0.1",
"gulp-uglify": "^3.0.2",
"gulp-umd": "^2.0.0",
"mocha": "^5.2.0"
"karma": "^4.2.0",
"karma-chrome-launcher": "^3.0.0",
"karma-mocha": "^1.3.0",
"karma-spec-reporter": "0.0.32",
"mocha": "^6.1.4"
}
}

@@ -1,18 +0,26 @@

[![npm](https://img.shields.io/npm/v/dailychart.svg)](https://www.npmjs.com/package/dailychart)
# Dailychart.js
Dailychart.js is a tiny standalone SVG charting library to display daily graph of a stock market security.
[![npm](https://img.shields.io/npm/v/dailychart.svg)](https://www.npmjs.com/package/dailychart)
[![Travis (.org)](https://img.shields.io/travis/kbychkov/dailychart.svg)](https://travis-ci.org/kbychkov/dailychart)
[![Dependency Status](https://img.shields.io/david/kbychkov/dailychart.svg)](https://david-dm.org/kbychkov/dailychart)
[![devDependency Status](https://img.shields.io/david/dev/kbychkov/dailychart.svg)](https://david-dm.org/kbychkov/dailychart?type=dev)
[![Greenkeeper badge](https://badges.greenkeeper.io/kbychkov/dailychart.svg)](https://greenkeeper.io/)
Demo available on [https://kbychkov.github.io/dailychart/](https://kbychkov.github.io/dailychart/)
Dailychart.js is a tiny standalone SVG charting library to display daily graph of a stock market security. Try the [demo](https://kbychkov.github.io/dailychart/).
## Installation
Download from NPM
The simplest way is to include the library file from CDN:
```html
<script src='https://unpkg.com/dailychart/dist/dailychart.min.js'></script>
```
It's also possible to install the package as a dependency from NPM
```bash
npm install dailychart
npm install dailychart --save
```
Include the library
then include the library into your project:

@@ -23,12 +31,10 @@ ```js

of include the file
## Usage
```html
<script src='./path/to/dailychart.js'></script>
```
First, create a container for the chart and fill with data using attributes.
## Usage
- `data-dailychart-values` (required) - comma-separated values for the chart.
- `data-dailychart-close` - the value splits the chart on two areas (positive, negative) with its own colors.
- `data-dailychart-length` - the total number of data points. Used to scale the chart along the horizontal axis. If `data-dailychart-values` has fewer points the remaining space will be empty. On the other hand, if `data-dailychart-length` isn't defined the chart will fit the container.
### HTML
```html

@@ -42,3 +48,3 @@ <div id="chart"

### CSS
Optionally apply CSS to the container.

@@ -52,11 +58,14 @@ ```css

### JavaScript
Finally, create the chart for the element.
```js
var el = document.getElementById('chart');
new Dailychart(el, [options]);
Dailychart.create('#chart', { lineWidth: 2 });
```
## Options
The first parameter can be a HTML element, a list of HTML elements or a CSS selector string.
## Configuration
The second parameter of the constructor is an object that contains the number of options to control the appearance of the chart.
- `width` - Chart width. If not set it equals to container's width.

@@ -71,7 +80,5 @@ - `height` - Chart height. If not set it equals to container's height.

- `closeColor` - Color of the close line (default: '#e0e0e0').
## License
## HTML Attributes
- `data-dailychart-values` - Comma delimited data points for the graph.
- `data-dailychart-length` - Number of points in the trading session.
- `data-dailychart-close` - Close value of previous trading session.
Dailychart.js is available under the [MIT License](https://github.com/kbychkov/dailychart/blob/master/LICENSE).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc