{"name":"viser","version":"0.2.1","description":"viser is a toolkit fit for data vis engineer.","repository":{"type":"git","url":"git+https://github.com/viserjs/viser.git"},"license":"MIT","authors":"DT-FE","files":["lib","es","umd","src"],"main":"lib/index.js","module":"es/index.js","types":"src/index.ts","scripts":{"build":"node ./tools/build.js","clean":"git clean -fdX .","lint":"tslint src","analyse":"NODE_ENV=analyse webpack --progress --config webpack.config.js"},"dependencies":{"@antv/data-set":"^0.5.0","@antv/g2":"^3.0.0-rc5.12","d3-format":"^1.2.0","lodash":"^4.17.4"},"devDependencies":{"@types/d3-format":"*","@types/lodash":"*","@types/node":"*","babel-cli":"^6.26.0","babel-loader":"^7.1.2","babel-plugin-dev-expression":"^0.2.1","babel-plugin-external-helpers":"^6.22.0","babel-plugin-lodash":"^3.3.2","babel-preset-env":"^1.6.1","colors":"^1.1.2","gzip-size":"^4.0.0","ora":"^1.3.0","pretty-bytes":"^4.0.2","rimraf":"^2.6.2","tslint":"^5.5.0","typescript":"^2.4.1","webpack":"^3.3.0","webpack-bundle-analyzer":"^2.9.0"},"keywords":["g2","chart","datavis"],"bugs":{"url":"https://github.com/viserjs/viser/issues"},"homepage":"https://github.com/viserjs/viser#readme","_id":"viser@0.2.1","_npmVersion":"5.5.1","_nodeVersion":"8.3.0","_npmUser":{"name":"arcthur","email":"arthurtemptation@gmail.com"},"dist":{"integrity":"sha512-yK+eqFgRCvR6cn1jAzG0rTGlBo6ooF0VFo1rM1hJHonBfjLsHk7DwA6IUDwhulbDjg0UvGxmkdu9AzgqLECg2A==","shasum":"78a7b67145b4a4df7a0f38316485079eebc235e8","tarball":"http://registry-npm.ywwl.com/viser/download/viser-0.2.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHMC6SSd3rMFewbv5kdtqiLvMMmAdmsMFl7WAmfq7HJEAiAOcJEGxLQYimqEWke/ZCLM9iHT5I5ouaHLB1/psXNtwg=="}],"size":831132,"noattachment":false,"key":"/viser/-/viser-0.2.1.tgz"},"maintainers":[{"name":"arcthur","email":"arthurtemptation@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/viser-0.2.1.tgz_1511144439692_0.23750916635617614"},"directories":{},"readme":"# viser [![npm](https://img.shields.io/npm/v/viser.svg)](https://www.npmjs.com/package/viser) [![Dependency Status](https://david-dm.org/viserjs/viser.svg?path=packages/viser)](https://david-dm.org/viserjs/viser.svg?path=packages/viser)\n\n> A toolkit fit for data vis engineer.\n\n## Install\n\n```sh\n$ npm install --save viser\n```\n\n## Usage\n\n```jsx\nimport viser from 'viser';\nconst DataSet = require('@antv/data-set');\n\nconst sourceData = [\n  { month: 'Jan', Tokyo: 7.0, London: 3.9 },\n  { month: 'Feb', Tokyo: 6.9, London: 4.2 },\n  { month: 'Mar', Tokyo: 9.5, London: 5.7 },\n  { month: 'Apr', Tokyo: 14.5, London: 8.5 },\n  { month: 'May', Tokyo: 18.4, London: 11.9 },\n  { month: 'Jun', Tokyo: 21.5, London: 15.2 },\n  { month: 'Jul', Tokyo: 25.2, London: 17.0 },\n  { month: 'Aug', Tokyo: 26.5, London: 16.6 },\n  { month: 'Sep', Tokyo: 23.3, London: 14.2 },\n  { month: 'Oct', Tokyo: 18.3, London: 10.3 },\n  { month: 'Nov', Tokyo: 13.9, London: 6.6 },\n  { month: 'Dec', Tokyo: 9.6, London: 4.8 },\n];\n\nconst dv = new DataSet.View().source(sourceData);\ndv.transform({\n  type: 'fold',\n  fields: ['Tokyo', 'London'],\n  key: 'city',\n  value: 'temperature',\n});\nconst data = dv.rows;\n\nviser({\n  data,\n  axis: true,\n  legend: true,\n  tooltip: true,\n  series: [{\n    quickType: 'smoothLine',\n    position: 'month*temperature',\n    color: \"city\",\n    size: 2,\n  }, {\n    quickType: 'point',\n    position: 'month*temperature',\n    color: \"city\",\n    size: 4,\n    style: {\n      stroke: '#fff',\n      lineWidth: 1,\n    },\n  }],\n  chart: {\n    container: 'mountNode',\n    width: 800,\n    height: 400,\n  },\n});\n```\n","publish_time":1511144439932,"_cnpm_publish_time":1511144439932,"dist-tags":{"latest":"2.4.9"}}