Browse Source

Merge branch 'use-core-0.3.0' into 'main'

Use Core 0.3.0

See merge request chartwerk/line-pod!11
merge-requests/12/merge
Alexey Velikiy 3 years ago
parent
commit
fb82616e9c
  1. 4
      dist/index.js
  2. 2
      examples/demo.html
  3. 8
      package-lock.json
  4. 4
      package.json
  5. 3
      src/index.ts

4
dist/index.js vendored

File diff suppressed because one or more lines are too long

2
examples/demo.html

@ -15,7 +15,7 @@
const data1 = Array.from({ length: arrayLength }, (el, idx) => [startTime + idx * 10000, Math.floor(Math.random() * 40)]);
const data2 = Array.from({ length: arrayLength }, (el, idx) => [startTime + idx * 10000, Math.floor(Math.random() * 100)]);
const data3 = Array.from({ length: arrayLength }, (el, idx) => [startTime + idx * 10000, Math.floor(Math.random() * 20) + 90]);
const zoomIn = (ranges) => { const range = ranges[0]; options.axis.x.range = range; pod.updateData(undefined, options) }
const zoomIn = (ranges) => { pod.render(); }
const zoomOut = (ranges) => { console.log('zoomout'); options.axis.x.range = undefined; pod.updateData(undefined, options) }
let options = {
renderLegend: false, usePanning: false, axis: { y: { invert: false, range: [0, 350] }, x: { format: 'time' } },

8
package-lock.json generated

@ -1,13 +1,13 @@
{
"name": "@chartwerk/line-pod",
"version": "0.2.4",
"version": "0.4.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@chartwerk/core": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/@chartwerk/core/-/core-0.1.1.tgz",
"integrity": "sha512-AgERJVR6agOXULOQsc7sQHM7INP8iaF+kGj2c08DYTZ6SmIUGJFWpcSVTTccZZ3Szf/ypiI60tC1bgTKaIchTg=="
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/@chartwerk/core/-/core-0.3.0.tgz",
"integrity": "sha512-Dnw/akMqBvWEQDlzcendAzHsqzLE+jcWVU7fYnsXLFKCZT+JJL2cMpBv/aZ24/pw7WZQg2ORdLgAfLc3Ph9kuA=="
},
"@types/d3": {
"version": "5.16.4",

4
package.json

@ -1,6 +1,6 @@
{
"name": "@chartwerk/line-pod",
"version": "0.4.1",
"version": "0.4.2",
"description": "Chartwerk line chart",
"main": "dist/index.js",
"scripts": {
@ -15,7 +15,7 @@
"author": "CorpGlory",
"license": "ISC",
"dependencies": {
"@chartwerk/core": "^0.2.0"
"@chartwerk/core": "^0.3.0"
},
"devDependencies": {
"@types/d3": "5.16.4",

3
src/index.ts

@ -18,6 +18,8 @@ export class LinePod extends ChartwerkPod<LineTimeSerie, LineOptions> {
}
renderMetrics(): void {
this.d3.select('.metrics-container').remove();
this.updateCrosshair();
this.initLineGenerator();
@ -72,7 +74,6 @@ export class LinePod extends ChartwerkPod<LineTimeSerie, LineOptions> {
}
public appendData(data: [number, number][]): void {
this.clearScaleCache();
for(let idx = 0; idx < this.series.length; ++idx) {
if(this.series[idx].visible === false) {

Loading…
Cancel
Save