Browse Source

upd deps && remove demo

pull/1/head
rozetko 1 year ago
parent
commit
d5e7c98be2
  1. 16
      demo.html
  2. 16
      package.json
  3. 4
      src/index.ts
  4. 3200
      yarn.lock

16
demo.html

@ -1,16 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<script src="./dist/index.js" type="text/javascript"></script>
</head>
<body>
<div id="chart" style="width: 500px; height: 500px;"></div>
<script type="text/javascript">
new ChartwerkPod(document.getElementById('chart'))
</script>
</body>
</html>

16
package.json

@ -16,15 +16,15 @@
"author": "CorpGlory Inc.", "author": "CorpGlory Inc.",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"d3": "^5.7.2", "d3": "^5.16.0",
"lodash": "^4.14.149" "lodash": "^4.17.21"
}, },
"devDependencies": { "devDependencies": {
"css-loader": "^3.4.2", "css-loader": "^6.8.1",
"style-loader": "^1.1.3", "style-loader": "^3.3.3",
"ts-loader": "^6.2.1", "ts-loader": "^9.4.3",
"typescript": "^3.8.3", "typescript": "^5.1.3",
"webpack": "^4.42.0", "webpack": "^5.87.0",
"webpack-cli": "^3.3.11" "webpack-cli": "^5.1.4"
} }
} }

4
src/index.ts

@ -32,10 +32,8 @@ import * as d3 from 'd3';
import first from 'lodash/first'; import first from 'lodash/first';
import last from 'lodash/last'; import last from 'lodash/last';
import debounce from 'lodash/debounce'; import debounce from 'lodash/debounce';
import isNil from 'lodash/isNil';
const DEFAULT_TICK_COUNT = 4;
const DEFAULT_TICK_SIZE = 2; const DEFAULT_TICK_SIZE = 2;
const MILISECONDS_IN_MINUTE = 60 * 1000; const MILISECONDS_IN_MINUTE = 60 * 1000;
@ -86,7 +84,7 @@ abstract class ChartwerkPod<T extends Serie, O extends Options> {
this.options = new CoreOptions(_options); this.options = new CoreOptions(_options);
this.series = new CoreSeries(_series); this.series = new CoreSeries(_series);
console.log(d3);
this.d3Node = d3.select(this.el); this.d3Node = d3.select(this.el);
this.addEventListeners(); this.addEventListeners();

3200
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save