mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-26 01:24:59 +02:00
feat(heatmap): add sorted bar chart view to sector HeatmapPanel (#2326)
* feat(heatmap): add sorted bar chart view to HeatmapPanel (#2246) - Add FearGreedSectorPerformance message to proto + regenerate - Expose sectorPerformance array in GetFearGreedIndexResponse RPC handler - HeatmapPanel.renderHeatmap accepts optional sectorBars; renders sorted horizontal bar chart below existing tile grid - Sectors ranked by day change (gainers first, losers last) - Green/red bars proportional to |change| (max ~3% = 100% width) - Reuses fearGreedIndex bootstrap data — zero extra network calls - Add .heatmap-bar-chart CSS: 18px rows, 10px font, compact layout * fix(heatmap): address code review P1 findings on PR #2326 - Server: guard change1d with Number.isFinite fallback so non-numeric Redis values (NaN) coerce to 0 instead of propagating through - Client: filter out any NaN change1d entries before computing maxAbs; Math.max propagates NaN so a single bad entry makes all bars invisible (width:NaN%); also bail early if filtered list is empty * fix(heatmap): address Greptile review comments on PR #2326 Use var(--green)/var(--red) for bar fill colour to match text label CSS variables and avoid visual mismatch across themes.
This commit is contained in:
@@ -1519,6 +1519,10 @@ components:
|
||||
tltPrice:
|
||||
type: number
|
||||
format: double
|
||||
sectorPerformance:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/FearGreedSectorPerformance'
|
||||
FearGreedCategory:
|
||||
type: object
|
||||
properties:
|
||||
@@ -1535,6 +1539,16 @@ components:
|
||||
type: boolean
|
||||
inputsJson:
|
||||
type: string
|
||||
FearGreedSectorPerformance:
|
||||
type: object
|
||||
properties:
|
||||
symbol:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
change1d:
|
||||
type: number
|
||||
format: double
|
||||
ListEarningsCalendarRequest:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
Reference in New Issue
Block a user