-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathdata-source.ts
47 lines (35 loc) · 1.07 KB
/
data-source.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { IPaneView } from '../views/pane/ipane-view';
import { IPriceAxisView } from '../views/price-axis/iprice-axis-view';
import { ITimeAxisView } from '../views/time-axis/itime-axis-view';
import { IDataSource } from './idata-source';
import { Pane } from './pane';
import { PriceScale } from './price-scale';
export abstract class DataSource implements IDataSource {
protected _priceScale: PriceScale | null = null;
private _zorder: number = 0;
public zorder(): number {
return this._zorder;
}
public setZorder(zorder: number): void {
this._zorder = zorder;
}
public priceScale(): PriceScale | null {
return this._priceScale;
}
public setPriceScale(priceScale: PriceScale | null): void {
this._priceScale = priceScale;
}
public priceAxisViews(pane?: Pane, priceScale?: PriceScale): readonly IPriceAxisView[] {
return [];
}
public paneViews(pane?: Pane): readonly IPaneView[] {
return [];
}
public timeAxisViews(): readonly ITimeAxisView[] {
return [];
}
public visible(): boolean {
return true;
}
public abstract updateAllViews(): void;
}