Browse Source

Merge branch 'broken-examples-after-renaming-#3' into 'main'

fx usage of LinePod in examples

Closes #2

See merge request chartwerk/line-pod!6
merge-requests/7/merge
Alexander Velikiy 3 years ago
parent
commit
2a7c5dbb08
  1. 2
      dist/index.d.ts
  2. 2
      dist/index.js
  3. 2
      examples/demo.html
  4. 2
      examples/demo_live.html
  5. 2
      examples/demo_vertical.html

2
dist/index.d.ts vendored

@ -1,6 +1,6 @@
import { ChartwerkPod, TickOrientation, TimeFormat } from '@chartwerk/core'; import { ChartwerkPod, TickOrientation, TimeFormat } from '@chartwerk/core';
import { LineTimeSerie, LineOptions, Mode } from './types'; import { LineTimeSerie, LineOptions, Mode } from './types';
export declare class ChartwerkLineChart extends ChartwerkPod<LineTimeSerie, LineOptions> { export declare class LinePod extends ChartwerkPod<LineTimeSerie, LineOptions> {
lineGenerator: any; lineGenerator: any;
metricContainer: any; metricContainer: any;
constructor(_el: HTMLElement, _series?: LineTimeSerie[], _options?: LineOptions); constructor(_el: HTMLElement, _series?: LineTimeSerie[], _options?: LineOptions);

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

2
examples/demo.html

@ -21,7 +21,7 @@
renderLegend: false, usePanning: false, axis: { y: { invert: false, range: [0, 350] }, x: { format: 'time' } }, renderLegend: false, usePanning: false, axis: { y: { invert: false, range: [0, 350] }, x: { format: 'time' } },
eventsCallbacks: { zoomIn: zoomIn, zoomOut } eventsCallbacks: { zoomIn: zoomIn, zoomOut }
} }
var pod = new ChartwerkLineChart( var pod = new LinePod(
document.getElementById('chart'), document.getElementById('chart'),
[ [
{ target: 'test1', datapoints: data1, color: 'green' }, { target: 'test1', datapoints: data1, color: 'green' },

2
examples/demo_live.html

@ -18,7 +18,7 @@
const data2 = Array.from({ length: arrayLength }, (el, idx) => [Math.floor(Math.random() * 100), startTime + idx * 10000]); const data2 = Array.from({ length: arrayLength }, (el, idx) => [Math.floor(Math.random() * 100), startTime + idx * 10000]);
const data3 = Array.from({ length: arrayLength }, (el, idx) => [Math.floor(Math.random() * 20) + 90, startTime + idx * 10000]); const data3 = Array.from({ length: arrayLength }, (el, idx) => [Math.floor(Math.random() * 20) + 90, startTime + idx * 10000]);
let options = { renderLegend: false, usePanning: false, axis: { y: { invert: false, range: [0, 350] }, x: { format: 'time' } } }; let options = { renderLegend: false, usePanning: false, axis: { y: { invert: false, range: [0, 350] }, x: { format: 'time' } } };
var pod = new ChartwerkLineChart( var pod = new LinePod(
document.getElementById('chart'), document.getElementById('chart'),
[ [
{ target: 'test1', datapoints: data1, color: 'green', maxLength: arrayLength + 30, renderDots: true }, { target: 'test1', datapoints: data1, color: 'green', maxLength: arrayLength + 30, renderDots: true },

2
examples/demo_vertical.html

@ -36,7 +36,7 @@
crosshair: { orientation: 'horizontal' }, crosshair: { orientation: 'horizontal' },
margin: { top: 30, right: 20, bottom: 20, left: 50 } margin: { top: 30, right: 20, bottom: 20, left: 50 }
} }
var pod = new ChartwerkLineChart( var pod = new LinePod(
document.getElementById('chart'), document.getElementById('chart'),
[ [
{ target: 'test1', datapoints: data1, color: 'green' }, { target: 'test1', datapoints: data1, color: 'green' },

Loading…
Cancel
Save