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:
@@ -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
|
||||
|
Reference in New Issue
Block a user