Skip to content

Commit

Permalink
Update MapChartComponent.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
mmehta2669 authored Sep 30, 2024
1 parent 2c4d213 commit c119458
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/client/app/components/MapChartComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,10 @@ export default function MapChartComponent() {
//The Color checked if negative
if(averagedReading >= 0){
colors.push(getGraphColor(meterID, DataType.Meter));
}
else{
colors.push(getGraphColor(6, DataType.Meter));
}
}
else{
colors.push(getGraphColor(6, DataType.Meter));
}
}
// The hover text.
hoverText.push(`<b> ${timeReading} </b> <br> ${label}: ${averagedReading.toPrecision(6)} ${unitLabel}`);
Expand Down Expand Up @@ -305,7 +305,7 @@ export default function MapChartComponent() {
// The circle size is set to area below. Thus, we need to convert from wanting a max
// diameter of minDimension * maxFeatureFraction to an area.
const maxCircleSize = Math.PI * Math.pow(minDimension * maxFeatureFraction / 2, 2);
const minCircleSize = Math.PI * Math.pow(minDimension * maxFeatureFraction / (10*2), 2)
const minCircleSize = Math.PI * Math.pow(minDimension * maxFeatureFraction / (10*2), 2);
// Find the largest circle which is usage.
const largestCircleSize = Math.max(...size);
const smallestCircleSize = Math.min(...size);
Expand All @@ -315,8 +315,8 @@ export default function MapChartComponent() {
const minShift = 10*scaling + 5;

for(let i=0;i<size.length;i++){
size[i]+=minShift;
}
size[i]+=minShift;
}


// Per https://plotly.com/javascript/reference/scatter/:
Expand Down

0 comments on commit c119458

Please sign in to comment.