Updated the Graph.tsx
and DataManipulator.ts
files to improve data visualization for traders. The graph now tracks the ratio between two stocks over time and includes upper and lower bounds for trading signals.
- Schema Update: Modified the schema to track
ratio
,upper_bound
,lower_bound
, andtrigger_alert
. Addedprice_abc
andprice_def
for ratio calculations. - Graph Configuration:
view
: Set toy_line
for continuous line graph.column-pivots
: Removed to focus on stock ratios rather than individual prices.row-pivots
: Maintained for x-axis timestamps.columns
: Focused onratio
,lower_bound
,upper_bound
, andtrigger_alert
.aggregates
: Consolidated duplicate data points based on timestamp.
- Lifecycle Methods:
- Updated
componentDidMount
to configure the graph with new fields. - Adjusted
componentDidUpdate
for proper data updates.
- Updated
- Interface Update: Adjusted
Row
interface to match the new schema. - Data Processing:
- Calculated
price_abc
andprice_def
from server data. - Computed
ratio
and setupper_bound
,lower_bound
, andtrigger_alert
. - Updated
generateRow
function to reflect changes and maintain data consistency.
- Calculated
- The graph now visualizes the ratio between two stocks, including upper and lower bounds, and alerts when bounds are crossed.