Bar graph added.

This commit is contained in:
prabhatdev
2020-07-28 00:48:25 +05:30
parent d0a6e2667d
commit 194b41124d
3468 changed files with 640611 additions and 169 deletions

27
node_modules/vega-canvas/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,27 @@
Copyright (c) 2015-2018, University of Washington Interactive Data Lab
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

37
node_modules/vega-canvas/README.md generated vendored Normal file
View File

@@ -0,0 +1,37 @@
# vega-canvas
[Canvas](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) and [Image](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/Image) object instantiation utilities. Creates an [HTML5 Canvas](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API), using either the web browser DOM or a [node-canvas](https://github.com/Automattic/node-canvas) library.
This package attempts three forms of canvas creation, in this order:
- If in a browser environment, use DOM methods to create a new canvas.
- If the [node-canvas](https://github.com/Automattic/node-canvas) library is present, use that.
- Otherwise, return `null`.
To ensure error-free build processes for client-side code, this module does not include any direct or optional dependencies on the [node-canvas](https://github.com/Automattic/node-canvas) library. Projects that use this pacakge and require canvas support for server-side (node.js) operations *must include a canvas dependency in their own `package.json` file*.
## API Reference
<a name="canvas" href="#canvas">#</a>
vega.<b>canvas</b>([<i>width</i>, <i>height</i>, <i>type</i>])
[<>](https://github.com/vega/vega/blob/master/packages/vega-canvas/index.js "Source")
Creates a new [Canvas](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) instance, with an optional *width* and *height* (in pixels). If *width* and *height* are omitted, creates a _0 x 0_ canvas. The optional *type* parameter is a [node-canvas type parameter](https://github.com/Automattic/node-canvas#createcanvas) to enable PDF or SVG output modes; this parameter is applied only if node-canvas is used. This method first attempts to create a canvas using the DOM `document.createElement` method. If that fails, the method then attempts to instantiate a canvas using the [node-canvas](https://github.com/Automattic/node-canvas) library. If that also fails, returns `null`.
<a name="domCanvas" href="#domCanvas">#</a>
vega.<b>domCanvas</b>([<i>width</i>, <i>height</i>])
[<>](https://github.com/vega/vega/blob/master/packages/vega-canvas/src/domCanvas.js "Source")
Creates a new [Canvas](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) instance, with an optional *width* and *height* (in pixels). If *width* and *height* are omitted, creates a _0 x 0_ canvas. This method first attempts to create a canvas using the DOM `document.createElement` method. If that fails, returns `null`.
<a name="nodeCanvas" href="#nodeCanvas">#</a>
vega.<b>nodeCanvas</b>([<i>width</i>, <i>height</i>, <i>type</i>])
[<>](https://github.com/vega/vega/blob/master/packages/vega-canvas/src/nodeCanvas.js "Source")
Creates a new [Canvas](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) instance, with an optional *width* and *height* (in pixels). If *width* and *height* are omitted, creates a _0 x 0_ canvas. The optional *type* parameter is a [node-canvas type parameter](https://github.com/Automattic/node-canvas#createcanvas) to enable PDF or SVG output modes. This method attempts to instantiate a canvas using using the [node-canvas](https://github.com/Automattic/node-canvas) library. If that fails, returns `null`. This method is not exported in browser-only builds.
<a name="image" href="#image">#</a>
vega.<b>image</b>()
[<>](https://github.com/vega/vega/blob/master/packages/vega-canvas/index.js "Source")
Returns a reference to the [Image](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/Image) constructor. In a web browser environment, simply returns the built-in `Image` object. Otherwise, attempts to return the `Image` instance exported by a node canvas library. If all attempts to find a canvas library fail, returns `null`.

29
node_modules/vega-canvas/build/vega-canvas.js generated vendored Normal file
View File

@@ -0,0 +1,29 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.vega = {}));
}(this, (function (exports) { 'use strict';
function domCanvas(w, h) {
if (typeof document !== 'undefined' && document.createElement) {
var c = document.createElement('canvas');
if (c && c.getContext) {
c.width = w;
c.height = h;
return c;
}
}
return null;
}
function domImage() {
return typeof Image !== 'undefined' ? Image : null;
}
exports.canvas = domCanvas;
exports.domCanvas = domCanvas;
exports.image = domImage;
Object.defineProperty(exports, '__esModule', { value: true });
})));

58
node_modules/vega-canvas/build/vega-canvas.node.js generated vendored Normal file
View File

@@ -0,0 +1,58 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function domCanvas(w, h) {
if (typeof document !== 'undefined' && document.createElement) {
var c = document.createElement('canvas');
if (c && c.getContext) {
c.width = w;
c.height = h;
return c;
}
}
return null;
}
function domImage() {
return typeof Image !== 'undefined' ? Image : null;
}
var NodeCanvas;
try {
NodeCanvas = require('canvas');
if (!(NodeCanvas && NodeCanvas.createCanvas)) {
NodeCanvas = null;
}
} catch (error) {
// do nothing
}
function nodeCanvas(w, h, type) {
if (NodeCanvas) {
try {
return new NodeCanvas.Canvas(w, h, type);
} catch (e) {
// do nothing, return null on error
}
}
return null;
}
function nodeImage() {
return (NodeCanvas && NodeCanvas.Image) || null;
}
function canvas(w, h, type) {
return domCanvas(w, h) || nodeCanvas(w, h, type) || null;
}
function image() {
return domImage() || nodeImage() || null;
}
exports.canvas = canvas;
exports.domCanvas = domCanvas;
exports.image = image;
exports.nodeCanvas = nodeCanvas;

5
node_modules/vega-canvas/index.browser.js generated vendored Normal file
View File

@@ -0,0 +1,5 @@
export {
domCanvas as domCanvas,
domCanvas as canvas,
domImage as image
} from './src/domCanvas';

13
node_modules/vega-canvas/index.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
import {domCanvas, domImage} from './src/domCanvas';
import {nodeCanvas, nodeImage} from './src/nodeCanvas';
export {domCanvas} from './src/domCanvas';
export {nodeCanvas} from './src/nodeCanvas';
export function canvas(w, h, type) {
return domCanvas(w, h) || nodeCanvas(w, h, type) || null;
}
export function image() {
return domImage() || nodeImage() || null;
}

68
node_modules/vega-canvas/package.json generated vendored Normal file
View File

@@ -0,0 +1,68 @@
{
"_from": "vega-canvas@^1.2.2",
"_id": "vega-canvas@1.2.2",
"_inBundle": false,
"_integrity": "sha512-39h8/fZp4kDwSeDGIEoyEiIgtP3mgY3D08InD1Ldm0FntePpSe1tXzC1zcvoLe/+f7Qprl6Jfwux/ksOXvpj2w==",
"_location": "/vega-canvas",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "vega-canvas@^1.2.2",
"name": "vega-canvas",
"escapedName": "vega-canvas",
"rawSpec": "^1.2.2",
"saveSpec": null,
"fetchSpec": "^1.2.2"
},
"_requiredBy": [
"/vega-geo",
"/vega-scenegraph",
"/vega-wordcloud"
],
"_resolved": "https://registry.npmjs.org/vega-canvas/-/vega-canvas-1.2.2.tgz",
"_shasum": "f31aae9ac1e1ed01bb7817a1e53099279e2d3d43",
"_spec": "vega-canvas@^1.2.2",
"_where": "/home/prabhatdev/Documents/opensource/gitHubStats/waka-readme-stats/node_modules/vega-scenegraph",
"author": {
"name": "Jeffrey Heer",
"url": "http://idl.cs.washington.edu"
},
"browser": {
"./build/vega-canvas.node.js": "./build/vega-canvas.js",
"./index.js": "./index.browser.js"
},
"bugs": {
"url": "https://github.com/vega/vega/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Canvas and Image utilities.",
"gitHead": "35e31c5c6b54db9dc3a577b5adad8d15ec274d32",
"homepage": "https://github.com/vega/vega#readme",
"jsdelivr": "build/vega-canvas.js",
"keywords": [
"vega",
"canvas",
"image"
],
"license": "BSD-3-Clause",
"main": "build/vega-canvas.node.js",
"module": "index",
"name": "vega-canvas",
"repository": {
"type": "git",
"url": "git+https://github.com/vega/vega.git"
},
"scripts": {
"build": "yarn rollup",
"postpublish": "git push && git push --tags",
"prebuild": "rimraf build && mkdir build",
"prepublishOnly": "yarn test && yarn build",
"pretest": "yarn prebuild && yarn rollup",
"rollup": "rollup -f cjs -n vega -o build/vega-canvas.node.js -- index.js && rollup -f umd -n vega -o build/vega-canvas.js -- index.browser.js",
"test": "tape 'test/**/*-test.js'"
},
"unpkg": "build/vega-canvas.js",
"version": "1.2.2"
}

15
node_modules/vega-canvas/src/domCanvas.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
export function domCanvas(w, h) {
if (typeof document !== 'undefined' && document.createElement) {
var c = document.createElement('canvas');
if (c && c.getContext) {
c.width = w;
c.height = h;
return c;
}
}
return null;
}
export function domImage() {
return typeof Image !== 'undefined' ? Image : null;
}

25
node_modules/vega-canvas/src/nodeCanvas.js generated vendored Normal file
View File

@@ -0,0 +1,25 @@
var NodeCanvas;
try {
NodeCanvas = require('canvas');
if (!(NodeCanvas && NodeCanvas.createCanvas)) {
NodeCanvas = null;
}
} catch (error) {
// do nothing
}
export function nodeCanvas(w, h, type) {
if (NodeCanvas) {
try {
return new NodeCanvas.Canvas(w, h, type);
} catch (e) {
// do nothing, return null on error
}
}
return null;
}
export function nodeImage() {
return (NodeCanvas && NodeCanvas.Image) || null;
}