-
Notifications
You must be signed in to change notification settings - Fork 623
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
338 changed files
with
38,254 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
{ | ||
"name": "vega-lite", | ||
"author": "Jeffrey Heer, Dominik Moritz, Kanit \"Ham\" Wongsuphasawat", | ||
"version": "2.0.0-alpha.10", | ||
"collaborators": [ | ||
"Kanit Wongsuphasawat <[email protected]> (http://kanitw.yellowpigz.com)", | ||
"Dominik Moritz <[email protected]> (https://www.domoritz.de)", | ||
"Jeffrey Heer <[email protected]> (http://jheer.org)" | ||
], | ||
"homepage": "https://vega.github.io/vega-lite/", | ||
"description": "Vega-lite provides a higher-level grammar for visual analysis, comparable to ggplot or Tableau, that generates complete Vega specifications.", | ||
"main": "build/src/vl.js", | ||
"types": "build/src/vl.d.ts", | ||
"bin": { | ||
"vl2png": "./bin/vl2png", | ||
"vl2svg": "./bin/vl2svg", | ||
"vl2vg": "./bin/vl2vg" | ||
}, | ||
"directories": { | ||
"test": "test" | ||
}, | ||
"scripts": { | ||
"tsc": "rm -rf build/*/** && tsc", | ||
"prebuild": "mkdir -p build/site build/examples/images build/test-gallery", | ||
"build": "npm run tsc && cp package.json build && browserify src/vl.ts -p tsify -d -s vl | exorcist build/vega-lite.js.map > build/vega-lite.js", | ||
"postbuild": "uglifyjs build/vega-lite.js -cm --in-source-map build/vega-lite.js.map --source-map build/vega-lite.min.js.map > build/vega-lite.min.js && npm run schema", | ||
"build:examples": "./scripts/build-examples.sh", | ||
"build:images": "npm run data && scripts/generate-images.sh", | ||
"build:toc": "bundle exec jekyll build -q && scripts/generate-toc", | ||
"build:site": "npm run link && browserify site/static/main.ts -p [tsify -p site] -d | exorcist build/site/main.js.map > build/site/main.js", | ||
"build:versions": "scripts/update-version.sh", | ||
"build:test-gallery": "browserify test-gallery/main.ts -p [tsify -p test-gallery] -d > build/test-gallery/main.js", | ||
"check:examples": "scripts/check-examples.sh", | ||
"check:schema": "scripts/check-schema.sh", | ||
"clean": "rm -rf build && rm -f vega-lite.* & find -E src test site examples -regex '.*\\.(js|js.map|d.ts|vg.json)' -delete & rm -rf data", | ||
"data": "rsync -r node_modules/vega-datasets/data/* data", | ||
"link": "npm link && npm link vega-lite", | ||
|
||
"deploy": "scripts/deploy.sh", | ||
"deploy:gh": "scripts/deploy-gh.sh", | ||
"deploy:schema": "scripts/deploy-schema.sh", | ||
|
||
"prestart": "npm run data && npm run build && scripts/index-examples", | ||
"start": "nodemon -x 'npm run build:test-gallery' & browser-sync start --server --files 'build/test-gallery/main.js' --index 'test-gallery/index.html'", | ||
"poststart": "rm examples/all-examples.json", | ||
|
||
"preschema": "npm run prebuild", | ||
"schema": "typescript-json-schema --required true --noExtraProps true src/spec.ts TopLevelExtendedSpec > build/vega-lite-schema.json && rm -f _data/vega-lite-schema.json && npm run replaceschema && cp build/vega-lite-schema.json _data/", | ||
"replaceschema": "sed -i -e 's/GenericLayerSpec<.*..\\./LayerSpec/g' build/vega-lite-schema.json && sed -i -e 's/GenericRepeatSpec<.*..\\./RepeatSpec/g' build/vega-lite-schema.json && sed -i -e 's/GenericUnitSpec<.*..\\./UnitSpec/g' build/vega-lite-schema.json", | ||
"presite": "npm run build && npm run data && npm run build:site && npm run build:toc && npm run build:versions", | ||
"site": "bundle exec jekyll serve", | ||
|
||
"lint": "tslint --project tsconfig.json -c tslint.json --type-check", | ||
"test": "npm run tsc && npm run schema && npm run test:only && npm run lint", | ||
"posttest": "npm run data && npm run mocha:examples", | ||
"test:nocompile": "npm run test:only && npm run lint && npm run mocha:examples", | ||
"test:only": "nyc --reporter=html --reporter=text-summary npm run mocha:test", | ||
"test:debug": "npm run pretest && mocha --recursive --debug-brk build/test build/examples", | ||
"mocha:test": "mocha --require source-map-support/register --reporter dot --recursive build/test", | ||
"mocha:examples": "mocha --require source-map-support/register --reporter dot --recursive build/examples", | ||
|
||
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json", | ||
"watch:build": "watchify src/vl.ts -p tsify -v -d -s vl -o 'exorcist build/vega-lite.js.map > build/vega-lite.js'", | ||
"watch:test": "nodemon -x 'npm test'", | ||
"watch": "nodemon -x 'npm run build && npm run test:nocompile' # already ran schema in build" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/vega/vega-lite.git" | ||
}, | ||
"license": "BSD-3-Clause", | ||
"bugs": { | ||
"url": "https://github.com/vega/vega-lite/issues" | ||
}, | ||
"devDependencies": { | ||
"@types/chai": "^3.5.1", | ||
"@types/d3": "^4.7.0", | ||
"@types/highlight.js": "^9.1.9", | ||
"@types/json-stable-stringify": "^1.0.31", | ||
"@types/mocha": "^2.2.41", | ||
"@types/node": "^7.0.13", | ||
"ajv": "5.0.1-beta.1", | ||
"browser-sync": "~2.18.8", | ||
"browserify": "~14.3.0", | ||
"browserify-shim": "^3.8.14", | ||
"chai": "~3.5.0", | ||
"cheerio": "~0.22.0", | ||
"codecov": "~2.1.0", | ||
"d3": "^4.8.0", | ||
"exorcist": "~0.4.0", | ||
"highlight.js": "^9.11.0", | ||
"mocha": "~3.2.0", | ||
"nodemon": "~1.11.0", | ||
"nyc": "~10.2.0", | ||
"source-map-support": "~0.4.14", | ||
"tsify": "~3.0.1", | ||
"tslint": "~5.1.0", | ||
"tslint-eslint-rules": "^4.0.0", | ||
"typescript": "^2.2.2", | ||
"typescript-json-schema": "^0.11.0", | ||
"uglify-js": "~2.8.22", | ||
"vega": "3.0.0-beta.29", | ||
"vega-datasets": "vega/vega-datasets#gh-pages", | ||
"vega-embed": "3.0.0-beta.10", | ||
"watchify": "~3.9.0", | ||
"yaml-front-matter": "~3.4.0" | ||
}, | ||
"dependencies": { | ||
"json-stable-stringify": "~1.0.1", | ||
"tslib": "^1.6.1", | ||
"vega-event-selector": "^2.0.0-beta", | ||
"vega-util": "~1.2.0", | ||
"yargs": "~7.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export declare type AggregateOp = 'argmax' | 'argmin' | 'average' | 'count' | 'distinct' | 'max' | 'mean' | 'median' | 'min' | 'missing' | 'modeskew' | 'q1' | 'q3' | 'ci0' | 'ci1' | 'stdev' | 'stdevp' | 'sum' | 'valid' | 'values' | 'variance' | 'variancep'; | ||
export declare const AGGREGATE_OPS: AggregateOp[]; | ||
export declare const AGGREGATE_OP_INDEX: { | ||
[T: string]: 1; | ||
}; | ||
/** Additive-based aggregation operations. These can be applied to stack. */ | ||
export declare const SUM_OPS: AggregateOp[]; | ||
/** | ||
* Aggregation operators that always produce values within the range [domainMin, domainMax]. | ||
*/ | ||
export declare const SHARED_DOMAIN_OPS: AggregateOp[]; | ||
export declare const SHARED_DOMAIN_OP_INDEX: { | ||
[T: string]: 1; | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import { DateTime } from './datetime'; | ||
import { VgAxisBase, VgAxisConfig, VgAxisEncode } from './vega.schema'; | ||
export declare type AxisOrient = 'top' | 'right' | 'left' | 'bottom'; | ||
export interface AxisConfig extends VgAxisConfig { | ||
/** | ||
* Whether month names and weekday names should be abbreviated. | ||
* | ||
* __Default value:__ `false` | ||
*/ | ||
shortTimeLabels?: boolean; | ||
} | ||
export interface Axis extends VgAxisBase { | ||
/** | ||
* The padding, in pixels, between axis and text labels. | ||
*/ | ||
labelPadding?: number; | ||
/** | ||
* The formatting pattern for axis labels. This is D3's [number format pattern](https://github.com/mbostock/d3/wiki/Formatting) for quantitative axis and D3's [time format pattern](https://github.com/mbostock/d3/wiki/Time-Formatting) for time axis. | ||
* | ||
* __Default value:__ derived from [numberFormat](config.html#format) config for quantitative axis and from [timeFormat](config.html#format) config for time axis. | ||
*/ | ||
format?: string; | ||
/** | ||
* The orientation of the axis. One of top, bottom, left or right. The orientation can be used to further specialize the axis type (e.g., a y axis oriented for the right edge of the chart). | ||
* | ||
* __Default value:__ `"x"` axis is placed on the bottom, `"y"` axis is placed on the left, `"column"`"s x-axis is placed on the top, `"row"`s y-axis is placed on the right. | ||
*/ | ||
orient?: AxisOrient; | ||
/** | ||
* The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle. | ||
* | ||
* __Default value:__ derived from [axis config](config.html#facet-scale-config)'s `offset` (`0` by default) | ||
*/ | ||
offset?: number; | ||
/** | ||
* The anchor position of the axis in pixels. For x-axis with top or bottom orientation, this sets the axis group x coordinate. For y-axis with left or right orientation, this sets the axis group y coordinate. | ||
* | ||
* __Default value__: `0` | ||
*/ | ||
position?: number; | ||
/** | ||
* A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are "nice" (multiples of 2, 5, 10) and lie within the underlying scale's range. | ||
* @minimum 0 | ||
* @TJS-type integer | ||
*/ | ||
tickCount?: number; | ||
/** | ||
* A title for the axis. Shows field name and its function by default. | ||
* | ||
* __Default value:__ derived from the field's name and transformation function applied e.g, "field_name", "SUM(field_name)", "BIN(field_name)", "YEAR(field_name)". | ||
*/ | ||
title?: string; | ||
/** | ||
* Explicitly set the visible axis tick values. | ||
*/ | ||
values?: number[] | DateTime[]; | ||
/** | ||
* A non-positive integer indicating z-index of the axis. | ||
* If zindex is 0, axes should be drawn behind all chart elements. | ||
* To put them in front, use `"zindex = 1"`. | ||
* | ||
* __Default value:__ `0` (Behind the marks.) | ||
* | ||
* @TJS-type integer | ||
* @minimum 0 | ||
*/ | ||
zindex?: number; | ||
/** | ||
* Optional mark definitions for custom axis encoding. | ||
*/ | ||
encode?: VgAxisEncode; | ||
} | ||
export declare const AXIS_PROPERTIES: (keyof Axis)[]; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { Channel } from './channel'; | ||
export interface BaseBin { | ||
/** | ||
* The number base to use for automatic bin determination (default is base 10). | ||
* | ||
* __Default value:__ `10` | ||
* | ||
*/ | ||
base?: number; | ||
/** | ||
* An exact step size to use between bins. | ||
* | ||
* __Note:__ If provided, options such as maxbins will be ignored. | ||
*/ | ||
step?: number; | ||
/** | ||
* An array of allowable step sizes to choose from. | ||
* @minItems 1 | ||
*/ | ||
steps?: number[]; | ||
/** | ||
* A minimum allowable step size (particularly useful for integer values). | ||
*/ | ||
minstep?: number; | ||
/** | ||
* Scale factors indicating allowable subdivisions. The default value is [5, 2], which indicates that for base 10 numbers (the default base), the method may consider dividing bin sizes by 5 and/or 2. For example, for an initial step size of 10, the method can check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might also satisfy the given constraints. | ||
* | ||
* __Default value:__ `[5, 2]` | ||
* | ||
* @minItems 1 | ||
*/ | ||
divide?: number[]; | ||
/** | ||
* Maximum number of bins. | ||
* | ||
* __Default value:__ `6` for `row`, `column` and `shape` channels; `10` for other channels | ||
* | ||
* @minimum 2 | ||
*/ | ||
maxbins?: number; | ||
/** | ||
* If true (the default), attempts to make the bin boundaries use human-friendly boundaries, such as multiples of ten. | ||
*/ | ||
nice?: boolean; | ||
} | ||
/** | ||
* Binning properties or boolean flag for determining whether to bin data or not. | ||
*/ | ||
export interface Bin extends BaseBin { | ||
/** | ||
* A two-element (`[min, max]`) array indicating the range of desired bin values. | ||
* @minItems 2 | ||
* @maxItems 2 | ||
*/ | ||
extent?: number[]; | ||
} | ||
export declare function binToString(bin: Bin | boolean): string; | ||
export declare function autoMaxBins(channel: Channel): number; |
Oops, something went wrong.