#pragma once

#include "pv/PvApp.h"

class PvChartBar;
class PvChartCurve;

class MaskPageStat : public PvMask
{
public:
    MaskPageStat(PARAM* p);
    
    int initUI(EPvCode pvcode);

    void initChartBar(std::shared_ptr<PvChartBar> chart, std::vector<std::string>& vecAxis, std::vector<std::pair<std::string, int>>& vecItems);
    void initChartCurve(std::shared_ptr<PvChartCurve> chart, std::vector<std::string>& vecAxis, std::vector<std::pair<std::string, int>>& vecItems);

    EPvCode onEventButton(int pvid) override;

    std::map<int, std::string> mapSubpage_;

    std::shared_ptr<PvChartBar> chart1;
    std::shared_ptr<PvChartBar> chart2;
    std::shared_ptr<PvChartCurve> chart3;
    std::shared_ptr<PvChartCurve> chart4;
};