Change adValue for always summing up values received
This commit is contained in:
@@ -63,10 +63,9 @@ class ASCIIBarChart {
|
|||||||
* @param {number} value - The numeric value to add
|
* @param {number} value - The numeric value to add
|
||||||
*/
|
*/
|
||||||
addValue(value) {
|
addValue(value) {
|
||||||
|
// Time bin mode: add value to current active bin count
|
||||||
// Time bin mode: increment count in current active bin
|
|
||||||
this.checkBinRotation(); // Ensure we have an active bin
|
this.checkBinRotation(); // Ensure we have an active bin
|
||||||
this.bins[this.currentBinIndex].count++;
|
this.bins[this.currentBinIndex].count += value; // Changed from ++ to += value
|
||||||
this.totalDataPoints++;
|
this.totalDataPoints++;
|
||||||
|
|
||||||
this.render();
|
this.render();
|
||||||
|
|||||||
Reference in New Issue
Block a user