Skip to content

Commit 7b8f9fa

Browse files
authored
Merge pull request #33 from pfizer-opensource/unused-logic-removal
Remove data processor from the exported dist code
2 parents 4b0510f + fd60510 commit 7b8f9fa

File tree

7 files changed

+1
-26
lines changed

7 files changed

+1
-26
lines changed

src/graphs/UIControlsRenderer.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ export default class UIControlsRenderer extends Renderer {
9696
computeReportingRange(noOfDays) {
9797
const finalDate = this.data[this.data.length - 1][this.datePropertyName];
9898
let endDate = new Date(finalDate);
99-
console.log(this.data[this.data.length - 1], finalDate, noOfDays);
10099
let startDate = addDaysToDate(finalDate, -Number(noOfDays));
101100
if (this.selectedTimeRange) {
102101
endDate = new Date(this.selectedTimeRange[1]);
@@ -155,8 +154,6 @@ export default class UIControlsRenderer extends Renderer {
155154
* and then redraws the x-axis based on the selected time range.
156155
*/
157156
changeTimeInterval(isManualUpdate, chart) {
158-
// console.log("this.timeInterval", this.timeInterval)
159-
160157
if (isManualUpdate) {
161158
switch (this.timeInterval) {
162159
case 'weeks':
@@ -178,7 +175,6 @@ export default class UIControlsRenderer extends Renderer {
178175
}
179176

180177
determineTheAppropriateAxisLabels() {
181-
// console.log("this.reportingRangeDays", this.reportingRangeDays)
182178
if (this.reportingRangeDays <= 31) {
183179
return 'days';
184180
}

src/graphs/cfd/CFDRenderer.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ class CFDRenderer extends UIControlsRenderer {
5353
super(data);
5454
this.states = states;
5555
this.#statesColors = d3.scaleOrdinal().domain(this.states).range(this.#colorPalette);
56-
console.table(this.data);
5756
}
5857

5958
/**
@@ -568,21 +567,12 @@ class CFDRenderer extends UIControlsRenderer {
568567
const xPosition = coords[0];
569568
const yPosition = coords[1];
570569

571-
// Debug logs
572-
// console.log("coords:", coords);
573-
// console.log("xPosition:", xPosition, "yPosition:", yPosition);
574-
// console.log("currentXScale domain:", this.currentXScale.domain());
575-
// console.log("currentXScale range:", this.currentXScale.range());
576-
577-
// Ensure xPosition is within the chart's range
578570
if (xPosition < 0 || xPosition > this.width) {
579-
console.log('xPosition out of bounds:', xPosition);
571+
console.warn('Mouse position out of bounds:', xPosition);
580572
return;
581573
}
582574

583575
const date = this.currentXScale.invert(xPosition);
584-
// console.log("pointer", date, event, coords);
585-
586576
const cumulativeCountOfWorkItems = this.currentYScale.invert(yPosition);
587577
const excludeCycleTime = eventName === 'scatterplot-mousemove';
588578

src/graphs/moving-range/MovingRangeGraph.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ class MovingRangeGraph {
1515

1616
// Sort the groupedArray by date to ensure correct ordering for difference calculation
1717
groupedArray.sort((a, b) => new Date(a.date) - new Date(b.date));
18-
// console.table(groupedArray);
1918
// Step 3: Calculate absolute differences
2019
const avgLeadTimes = [];
2120
for (let i = 1; i < groupedArray.length; i++) {

src/graphs/scatterplot/ScatterplotGraph.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ class ScatterplotGraph {
8585
}
8686
});
8787
dataSet.sort((t1, t2) => t1.deliveredDate - t2.deliveredDate);
88-
console.log(dataSet);
8988
return dataSet;
9089
}
9190
}

src/graphs/scatterplot/ScatterplotRenderer.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class ScatterplotRenderer extends UIControlsRenderer {
4040
*/
4141
constructor(data) {
4242
super(data);
43-
console.table(data);
4443
}
4544

4645
/**
@@ -134,7 +133,6 @@ class ScatterplotRenderer extends UIControlsRenderer {
134133
this.changeTimeInterval(false, `${this.chartName}`);
135134
this.drawXAxis(this.gx, this.currentXScale, this.height, true);
136135
this.drawYAxis(this.gy, this.currentYScale);
137-
console.log(this.dotClass);
138136
this.chartArea
139137
.selectAll(`.${this.dotClass}`)
140138
.attr('cx', (d) => this.currentXScale(d.deliveredDate))
@@ -186,8 +184,6 @@ class ScatterplotRenderer extends UIControlsRenderer {
186184
* @param {d3.Scale} y - The Y-axis scale.
187185
*/
188186
drawScatterplot(chartArea, data, x, y) {
189-
console.log('UP___dot____', this.dotClass);
190-
191187
chartArea
192188
.selectAll(`.${this.dotClass}`)
193189
.data(data)
@@ -212,8 +208,6 @@ class ScatterplotRenderer extends UIControlsRenderer {
212208
setupXAxisControl() {
213209
this.gx.on('click', () => {
214210
this.changeTimeInterval(true, `${this.chartName}`);
215-
console.log(this.gx);
216-
console.log(this.selectedTimeRange);
217211
this.drawXAxis(this.gx, this.x.copy().domain(this.selectedTimeRange), this.height, true);
218212
});
219213
}

src/graphs/scatterplot/SimpleScatterplotRenderer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ class SimpleScatterplotRenderer extends ScatterplotRenderer {
5757
}
5858

5959
drawScatterplot(chartArea, data, x, y) {
60-
console.log('Simple___dot____', this.dotClass);
6160
chartArea
6261
.selectAll(`.${this.dotClass}`)
6362
.data(data)

src/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import MovingRangeRenderer from './graphs/moving-range/MovingRangeRenderer.js';
88
import ControlRenderer from './graphs/control-chart/ControlRenderer.js';
99
import HistogramRenderer from './graphs/histogram/HistogramRenderer.js';
1010
import { eventBus } from './utils/EventBus.js';
11-
import { processServiceData } from './data-processor.js';
1211
import ObservationLoggingService from './graphs/ObservationLoggingService.js';
1312

1413
export {
@@ -23,5 +22,4 @@ export {
2322
HistogramRenderer,
2423
ObservationLoggingService,
2524
eventBus,
26-
processServiceData,
2725
};

0 commit comments

Comments
 (0)