I am a JS noob so this is probably poorly thought out. But it is a wip and I dont really care about the quality, just more the learning experience.
(cherry picked from commit a51d3f8d7b
)
22 lines
328 B
JavaScript
22 lines
328 B
JavaScript
export default class Datum {
|
|
constructor(time, price) {
|
|
this._time = time;
|
|
this._price = price;
|
|
}
|
|
|
|
getTime() {
|
|
return this._time;
|
|
}
|
|
|
|
getPrice() {
|
|
return this._price;
|
|
}
|
|
|
|
getX() {
|
|
return this.getTime();
|
|
}
|
|
|
|
getY() {
|
|
return this.getPrice();
|
|
}
|
|
} |