fix(selection): render gold brick chart as TDX brick blocks with strong-red flag
Match the ZXB1 sub-chart formula: each brick spans between yesterday's and today's brick value via a stacked range bar — rising bricks are hollow red (solid on strong_red), falling bricks solid green. The chart API now also returns brick_strong_red per point.
This commit is contained in:
@@ -141,6 +141,7 @@ class FakeChartService:
|
||||
trend_white=10.2,
|
||||
trend_yellow=10.4,
|
||||
brick_chart=5.0 if include_brick_chart else None,
|
||||
brick_strong_red=True if include_brick_chart else None,
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -462,6 +463,7 @@ def test_chart_returns_bounded_qfq_contract() -> None:
|
||||
"trend_white": 10.2,
|
||||
"trend_yellow": 10.4,
|
||||
"brick_chart": None,
|
||||
"brick_strong_red": None,
|
||||
}
|
||||
],
|
||||
}
|
||||
@@ -478,6 +480,7 @@ def test_chart_requests_brick_series_for_gold_brick_strategy() -> None:
|
||||
assert response.status_code == 200
|
||||
assert chart_service.request == ("000001.SZ", TARGET, True)
|
||||
assert response.json()["points"][0]["brick_chart"] == 5.0
|
||||
assert response.json()["points"][0]["brick_strong_red"] is True
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
||||
Reference in New Issue
Block a user