acttrader-charts 1.0.20 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1029,6 +1029,27 @@ interface ChartState {
1029
1029
  };
1030
1030
  /** Whether TFC (Trade from Charts) is currently active (user toggle state). */
1031
1031
  tfcEnabled?: boolean;
1032
+ /**
1033
+ * Visible time window, anchored by absolute unix-ms timestamps of the
1034
+ * viewport edges. Persisted separately from `drawings` so that pan/zoom
1035
+ * state survives a refresh without affecting drawing anchors. Stored as
1036
+ * time (not bar indexes) so the window remains meaningful after timeframe
1037
+ * changes and data backfill.
1038
+ */
1039
+ viewport?: {
1040
+ startTime: number;
1041
+ endTime: number;
1042
+ };
1043
+ /**
1044
+ * User-applied Y-axis adjustments. `factor` is the price-range scale
1045
+ * (>1 = zoomed out, <1 = zoomed in); `panOffset` is the vertical drag
1046
+ * offset in price units. Resets to `{factor: 1, panOffset: 0}` in
1047
+ * auto-fit mode.
1048
+ */
1049
+ priceScale?: {
1050
+ factor: number;
1051
+ panOffset: number;
1052
+ };
1032
1053
  }
1033
1054
  interface CrosshairPosition {
1034
1055
  x: number;
@@ -1029,6 +1029,27 @@ interface ChartState {
1029
1029
  };
1030
1030
  /** Whether TFC (Trade from Charts) is currently active (user toggle state). */
1031
1031
  tfcEnabled?: boolean;
1032
+ /**
1033
+ * Visible time window, anchored by absolute unix-ms timestamps of the
1034
+ * viewport edges. Persisted separately from `drawings` so that pan/zoom
1035
+ * state survives a refresh without affecting drawing anchors. Stored as
1036
+ * time (not bar indexes) so the window remains meaningful after timeframe
1037
+ * changes and data backfill.
1038
+ */
1039
+ viewport?: {
1040
+ startTime: number;
1041
+ endTime: number;
1042
+ };
1043
+ /**
1044
+ * User-applied Y-axis adjustments. `factor` is the price-range scale
1045
+ * (>1 = zoomed out, <1 = zoomed in); `panOffset` is the vertical drag
1046
+ * offset in price units. Resets to `{factor: 1, panOffset: 0}` in
1047
+ * auto-fit mode.
1048
+ */
1049
+ priceScale?: {
1050
+ factor: number;
1051
+ panOffset: number;
1052
+ };
1032
1053
  }
1033
1054
  interface CrosshairPosition {
1034
1055
  x: number;