Add misfire options to heatmap

This commit is contained in:
D. Berge
2025-08-03 13:45:07 +02:00
parent 0806b80445
commit 29c484affa

View File

@@ -452,6 +452,7 @@ export default {
let weights, offset = 0, scaler = 1; let weights, offset = 0, scaler = 1;
let colorDomain = null; let colorDomain = null;
let aggregation = "MEAN";
switch (this.heatmapValue) { switch (this.heatmapValue) {
case "total_error": case "total_error":
@@ -534,7 +535,23 @@ export default {
weights = values[19]; weights = values[19];
scaler = 0.1; scaler = 0.1;
break; break;
case "no_fire":
weights = values[20];
transform = v => v >> 4;
aggregation = "SUM";
colorDomain = [ 0.1, 1.5 ];
break;
case "autofire":
weights = values[20];
transform = v => v & 0xf;
aggregation = "SUM";
colorDomain = [ 0.5, 1.5 ];
break;
case "misfire":
weights = values[20];
aggregation = "SUM";
colorDomain = [ 0.5, 1.5 ];
break;
} }
@@ -575,12 +592,7 @@ export default {
getWeight: (d, {index, data}) => Math.abs(data.weights[index] * scaler + offset), getWeight: (d, {index, data}) => Math.abs(data.weights[index] * scaler + offset),
colorDomain, colorDomain,
radiusPixels: 25, radiusPixels: 25,
aggregation: 'MEAN', aggregation,
pickable: false,
...options
});
},
pickable: false, pickable: false,
...options ...options
}); });