stack_chart_common.h 812 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #pragma once
  8. namespace Data {
  9. struct StatisticalChart;
  10. } // namespace Data
  11. namespace Statistic {
  12. struct Limits;
  13. struct LeftStartAndStep final {
  14. float64 start = 0.;
  15. float64 step = 0.;
  16. };
  17. [[nodiscard]] LeftStartAndStep ComputeLeftStartAndStep(
  18. const Data::StatisticalChart &chartData,
  19. const Limits &xPercentageLimits,
  20. const QRect &rect,
  21. float64 xIndexStart);
  22. [[nodiscard]] Limits FindStackXIndicesFromRawXPercentages(
  23. const Data::StatisticalChart &chartData,
  24. const Limits &rawXPercentageLimits,
  25. const Limits &zoomedInLimitXIndices);
  26. } // namespace Statistic