|
@@ -620,6 +620,7 @@ export default class StockHeatmap extends React.Component {
|
|
|
* @param {any} data
|
|
* @param {any} data
|
|
|
*/
|
|
*/
|
|
|
addData = (data) => {
|
|
addData = (data) => {
|
|
|
|
|
+
|
|
|
if (typeof (data) === 'object') {
|
|
if (typeof (data) === 'object') {
|
|
|
this.data.push(data);
|
|
this.data.push(data);
|
|
|
this.updateWindowedData();
|
|
this.updateWindowedData();
|
|
@@ -641,7 +642,7 @@ export default class StockHeatmap extends React.Component {
|
|
|
moveDataWindow = (position) => {
|
|
moveDataWindow = (position) => {
|
|
|
if (position !== this.windowPosition && position > -1 && position < this.data.length - this.windowLength) {
|
|
if (position !== this.windowPosition && position > -1 && position < this.data.length - this.windowLength) {
|
|
|
// move position only if within valid range
|
|
// move position only if within valid range
|
|
|
- this.windowedData = this.data.slice(position, position + this.windowLength);
|
|
|
|
|
|
|
+ this.windowedData = this.data.slice(position, position + this.windowLength + 1);
|
|
|
this.windowPosition = position;
|
|
this.windowPosition = position;
|
|
|
if (this.windowPosition === this.data.length - this.windowLength - 1) {
|
|
if (this.windowPosition === this.data.length - this.windowLength - 1) {
|
|
|
// enable auto scroll
|
|
// enable auto scroll
|