Browse Source

fx usage of LinePod in examples

merge-requests/6/head
Alexey Velikiy 3 years ago
parent
commit
3d9ed19bdc
  1. 2
      dist/index.d.ts
  2. 47308
      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);

47308
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