2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Added initial support of zooming single chart to chart widget.

This commit is contained in:
23rd
2023-07-27 07:08:05 +03:00
committed by John Preston
parent 7b921dea3b
commit c9a976bf87
3 changed files with 74 additions and 1 deletions

View File

@@ -26,8 +26,11 @@ public:
ChartWidget(not_null<Ui::RpWidget*> parent);
void setChartData(Data::StatisticalChart chartData);
void setZoomedChartData(Data::StatisticalChart chartData);
void addHorizontalLine(Limits newHeight, bool animated);
[[nodiscard]] rpl::producer<float64> zoomRequests();
struct BottomCaptionLineData final {
int step = 0;
int stepMax = 0;
@@ -133,6 +136,8 @@ private:
base::unique_qptr<ChartLinesFilterWidget> _filterButtons;
Data::StatisticalChart _chartData;
base::unique_qptr<ChartWidget> _zoomedChartWidget;
std::unique_ptr<LinearChartView> _linearChartView;
struct {
@@ -155,6 +160,9 @@ private:
std::vector<ChartHorizontalLinesData> _horizontalLines;
bool _zoomEnabled = false;
rpl::event_stream<float64> _zoomRequests;
};
} // namespace Statistic