Загрузка данных


public getTimeAxisLabel(kind: string): AxisLabel | null {
  if (kind !== 'main' || !this.isActive || !this.point) {
    return null;
  }

  const coordinate = getXCoordinateFromTime(this.chart, this.point.time);

  if (coordinate === null || typeof this.point.time !== 'number') {
    return null;
  }

  const { colors } = getThemeStore();

  return {
    coordinate,
    text: String(this.point.time),
    textColor: colors.chartPriceLineText,
    backgroundColor: colors.axisMarkerLabelFill,
  };
}

public getPriceAxisLabel(kind: string): AxisLabel | null {
  if (kind !== 'main' || !this.isActive || !this.point) {
    return null;
  }

  const coordinate = getYCoordinateFromPrice(this.series, this.point.price);

  if (coordinate === null) {
    return null;
  }

  const { colors } = getThemeStore();

  return {
    coordinate,
    text: String(this.point.price),
    textColor: colors.chartPriceLineText,
    backgroundColor: colors.axisMarkerLabelFill,
  };
}