Browse Source

rename example to demo

pull/14/head
vargburz 11 months ago
parent
commit
43852582b6
  1. 8
      build/webpack.demo.conf.js
  2. 2
      demo/README.md
  3. 6
      demo/demo.html
  4. 4
      demo/demo_pod.ts
  5. 1
      src/index.ts

8
build/webpack.demo.conf.js

@ -5,8 +5,8 @@ function resolve(dir) {
} }
module.exports = { module.exports = {
context: resolve('example'), context: resolve('demo'),
entry: './example_pod.ts', entry: './demo_pod.ts',
plugins: [], plugins: [],
devtool: 'inline-source-map', devtool: 'inline-source-map',
watch: true, watch: true,
@ -32,8 +32,8 @@ module.exports = {
extensions: ['.ts', '.js'], extensions: ['.ts', '.js'],
}, },
output: { output: {
filename: 'example.js', filename: 'demo.js',
path: resolve('example/dist'), path: resolve('demo/dist'),
libraryTarget: 'umd', libraryTarget: 'umd',
umdNamedDefine: true umdNamedDefine: true
} }

2
example/README.md → demo/README.md

@ -2,4 +2,4 @@
run `yarn run dev` and `yarn run demo` in separate terminals simultaneously. run `yarn run dev` and `yarn run demo` in separate terminals simultaneously.
open `example.html` in your browser. open `demo.html` in your browser.

6
example/example.html → demo/demo.html

@ -4,7 +4,7 @@
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"> <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding"> <meta content="utf-8" http-equiv="encoding">
<script src="./dist/example.js" type="text/javascript"></script> <script src="./dist/demo.js" type="text/javascript"></script>
</head> </head>
<body> <body>
<div id="chart" style="width: 50%; height: 500px;"></div> <div id="chart" style="width: 50%; height: 500px;"></div>
@ -21,11 +21,11 @@
x: { format: 'time' } x: { format: 'time' }
}, },
zoomEvents: { zoomEvents: {
mouse: { zoom: { isActive: false } }, mouse: { zoom: { isActive: false }, pan: { isActive: false } },
scroll: { zoom: { isActive: false } } scroll: { zoom: { isActive: false } }
}, },
} }
var pod = new ExamplePod( var pod = new DemoPod(
document.getElementById('chart'), document.getElementById('chart'),
[ [
{ target: 'test1', datapoints: data1, color: 'green' }, { target: 'test1', datapoints: data1, color: 'green' },

4
example/example_pod.ts → demo/demo_pod.ts

@ -8,7 +8,7 @@ import * as d3 from 'd3';
import * as _ from 'lodash'; import * as _ from 'lodash';
class ExamplePod extends ChartwerkPod<Serie, Options> { class DemoPod extends ChartwerkPod<Serie, Options> {
lineGenerator = null; lineGenerator = null;
constructor( constructor(
@ -58,4 +58,4 @@ class ExamplePod extends ChartwerkPod<Serie, Options> {
hideSharedCrosshair(): void {} hideSharedCrosshair(): void {}
} }
export { ExamplePod }; export { DemoPod };

1
src/index.ts

@ -102,7 +102,6 @@ abstract class ChartwerkPod<T extends Serie, O extends Options> {
} }
public render(): void { public render(): void {
console.log('tut');
this.options.callbackRenderStart(); this.options.callbackRenderStart();
this.renderClipPath(); this.renderClipPath();

Loading…
Cancel
Save