export declare enum DomPosition {
Root = “root”,
Main = “main”,
YAxis = “yAxis”
}

export interface Chart {
getDom: (paneId?: string, position?: DomPosition) => Nullable<HTMLElement>;
getSize: (paneId?: string, position?: DomPosition) => Nullable<Bounding>;
setLocale: (locale: string) => void;
getLocale: () => string;
setStyles: (styles: string | DeepPartial<Styles>) => void;
getStyles: () => Styles;
setCustomApi: (customApi: Partial<CustomApi>) => void;
setPriceVolumePrecision: (pricePrecision: number, volumePrecision: number) => void;
getPriceVolumePrecision: () => Precision;
setTimezone: (timezone: string) => void;
getTimezone: () => string;
setOffsetRightDistance: (space: number) => void;
getOffsetRightDistance: () => number;
setLeftMinVisibleBarCount: (barCount: number) => void;
setRightMinVisibleBarCount: (barCount: number) => void;
setBarSpace: (space: number) => void;
getBarSpace: () => number;
getVisibleRange: () => VisibleRange;
clearData: () => void;
getDataList: () => KLineData[];
applyNewData: (dataList: KLineData[], more?: boolean, callback?: () => void) => void;
applyMoreData: (dataList: KLineData[], more?: boolean, callback?: () => void) => void;
updateData: (data: KLineData, callback?: () => void) => void;
loadMore: (cb: LoadMoreCallback) => void;
createIndicator: (value: string | IndicatorCreate, isStack?: boolean, paneOptions?: PaneOptions, callback?: () => void) => Nullable<string>;
overrideIndicator: (override: IndicatorCreate, paneId?: string, callback?: () => void) => void;
getIndicatorByPaneId: (paneId?: string, name?: string) => Nullable<Indicator> | Nullable<Map<string, Indicator>> | Map<string, Map<string, Indicator>>;
removeIndicator: (paneId: string, name?: string) => void;
createOverlay: (value: string | OverlayCreate, paneId?: string) => Nullable<string>;
getOverlayById: (id: string) => Nullable<Overlay>;
overrideOverlay: (override: Partial<OverlayCreate>) => void;
removeOverlay: (remove?: string | OverlayRemove) => void;
setPaneOptions: (options: PaneOptions) => void;
setZoomEnabled: (enabled: boolean) => void;
isZoomEnabled: () => boolean;
setScrollEnabled: (enabled: boolean) => void;
isScrollEnabled: () => boolean;
scrollByDistance: (distance: number, animationDuration?: number) => void;
scrollToRealTime: (animationDuration?: number) => void;
scrollToDataIndex: (dataIndex: number, animationDuration?: number) => void;
scrollToTimestamp: (timestamp: number, animationDuration?: number) => void;
zoomAtCoordinate: (scale: number, coordinate?: Coordinate, animationDuration?: number) => void;
zoomAtDataIndex: (scale: number, dataIndex: number, animationDuration?: number) => void;
zoomAtTimestamp: (scale: number, timestamp: number, animationDuration?: number) => void;
convertToPixel: (points: Partial<Point> | Array<Partial<Point>>, finder: ConvertFinder) => Partial<Coordinate> | Array<Partial<Coordinate>>;
convertFromPixel: (coordinates: Array<Partial<Coordinate>>, finder: ConvertFinder) => Partial<Point> | Array<Partial<Point>>;
executeAction: (type: ActionType, data: any) => void;
subscribeAction: (type: ActionType, callback: ActionCallback) => void;
unsubscribeAction: (type: ActionType, callback?: ActionCallback) => void;
getConvertPictureUrl: (includeOverlay?: boolean, type?: string, backgroundColor?: string) => string;
resize: () => void;
destroy: () => void;
}

from “klinecharts”;

const chart = useRef<Chart|null>(null);

const paneId = useRef<string>(“”);
chart.current?.
нужно добавить сжатие графика к центру по оси Y при отрисовке.
график не должен увеличиваться или уменьшаться, график не должен двигаться ни влево ни в право, по оси x он не двигается. График должен двигаться по оси Y