Skip to content

Commit b8388e0

Browse files
chhzh123claude
andcommitted
Add "Most Attractive" green quadrant to both scatter charts
- Overall Performance scatter: top-right green zone (Yield > 0.65 AND Quality > 0.65), highlighted with light green (#dcfce7) fill and a "★ Most Attractive" label in the upper-left corner of the zone - QYI vs Cost scatter: top-left green zone (Cost < $6 AND QYI > 0.55), same styling — low cost + high QYI is the desirable quadrant - Drawn before grid lines so it sits cleanly behind all chart elements Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c16a279 commit b8388e0

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

index.html

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,20 @@ <h2>Solve Metrics (T = 0)</h2>
744744
const y = d3.scaleLinear().domain([0.15, 1.05]).range([H - mg.bottom, mg.top]);
745745
const color = d3.scaleOrdinal(d3.schemeTableau10).domain(data.map(d => d.Model));
746746

747+
// ── "Most Attractive" zone: high Yield + high Quality
748+
const GX = 0.65, GY = 0.65;
749+
svg.append("rect")
750+
.attr("x", x(GX)).attr("y", y(1.04))
751+
.attr("width", x(1.02) - x(GX))
752+
.attr("height", y(GY) - y(1.04))
753+
.attr("fill", "#dcfce7").attr("fill-opacity", 0.65)
754+
.attr("stroke", "none");
755+
svg.append("text")
756+
.attr("x", x(GX) + 8).attr("y", y(1.04) + 14)
757+
.attr("font-size", "10").attr("font-weight", "700")
758+
.attr("fill", "#15803d")
759+
.text("★ Most Attractive");
760+
747761
// Grid
748762
[x, y].forEach((sc, i) => {
749763
const axis = i === 0 ? d3.axisBottom(sc) : d3.axisLeft(sc);
@@ -870,6 +884,20 @@ <h2>Solve Metrics (T = 0)</h2>
870884
const y = d3.scaleLinear().domain([0, 1.05]).range([H - mg.bottom, mg.top]);
871885
const color = d3.scaleOrdinal(d3.schemeTableau10).domain(valid.map(d => d.Model));
872886

887+
// ── "Most Attractive" zone: low Cost + high QYI
888+
const GCOST = 6, GQYI = 0.55;
889+
svg.append("rect")
890+
.attr("x", x(0.3)).attr("y", y(1.04))
891+
.attr("width", x(GCOST) - x(0.3))
892+
.attr("height", y(GQYI) - y(1.04))
893+
.attr("fill", "#dcfce7").attr("fill-opacity", 0.65)
894+
.attr("stroke", "none");
895+
svg.append("text")
896+
.attr("x", x(0.3) + 8).attr("y", y(1.04) + 14)
897+
.attr("font-size", "10").attr("font-weight", "700")
898+
.attr("fill", "#15803d")
899+
.text("★ Most Attractive");
900+
873901
// Horizontal grid only
874902
svg.append("g").attr("class","grid")
875903
.attr("transform",`translate(${mg.left},0)`)

0 commit comments

Comments
 (0)