wxr
2024-07-16 cbc156bc38d8b8eae7aef60cb186ab2b52fa701f
HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3EnergyPage.cs
@@ -15,19 +15,10 @@
        static AirSwitchP3EnergyPage bodyView;
        /// <summary>
        /// 总功耗-饼图
        /// </summary>
        MyEchartsViewOn myEchartsView_Pie;
        /// <summary>
        /// 曲线图数据string
        /// </summary>
        EchartsOption_BrokenLine brokenLine;
        /// <summary>
        /// 插查询的能源列表
        /// </summary>
        List<Function> queryList = new List<Function>();
        /// <summary>
        /// 查询条件
        /// hour、week、month
@@ -35,10 +26,6 @@
        string curQueryType = "hour";
        /// <summary>
        /// 能源列表区域
        /// </summary>
        FrameLayout energyListView;
        /// <summary>
        /// 历史数据图表
        /// </summary>
@@ -69,6 +56,7 @@
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(667-64),
                BackgroundColor = 0xFFF5F7FA,
                ScrollEnabled = false,
            };
            bodyView.AddChidren(contentView);
@@ -105,6 +93,7 @@
                BackgroundColor = 0x1F5C62FE,
                BorderColor = CSS_Color.MainColor,
                BorderWidth = 2,
                Radius = 1,
            };
            showDataTypeView.AddChidren(btnShowHistroyData_Day);
            btnShowHistroyData_Day.SetCornerWithSameRadius((uint)Application.GetRealHeight(6), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerBottomLeft);
@@ -119,10 +108,16 @@
                SelectedTextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                TextID = StringId.month,
                SelectedBackgroundColor = 0x1F5C62FE,
                BackgroundColor = 0x00000000,
                IsSelected = false,
                BorderWidth = 1,
                BorderColor = CSS_Color.PromptingColor1,
                Radius = 1,
            };
            showDataTypeView.AddChidren(btnShowHistroyData_Month);
            btnShowHistroyData_Month.BorderWidth = 1;
            btnShowHistroyData_Month.BorderColor = CSS_Color.PromptingColor1;
            var btnShowHistroyData_Year = new Button()
            {
@@ -133,10 +128,16 @@
                SelectedTextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                TextID = StringId.Years,
                SelectedBackgroundColor = 0x1F5C62FE,
                BackgroundColor = 0x00000000,
                IsSelected = false,
                BorderWidth = 1,
                BorderColor = CSS_Color.PromptingColor1,
                Radius = 1,
            };
            showDataTypeView.AddChidren(btnShowHistroyData_Year);
            btnShowHistroyData_Year.BorderWidth = 1;
            btnShowHistroyData_Year.BorderColor = CSS_Color.PromptingColor1;
            var btnShowHistroyData_Total = new Button()
            {
@@ -147,51 +148,170 @@
                SelectedTextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                TextID = StringId.Total,
                SelectedBackgroundColor = 0x1F5C62FE,
                BackgroundColor = 0x00000000,
                IsSelected = false,
                BorderWidth = 1,
                BorderColor = CSS_Color.PromptingColor1,
                Radius = 1,
            };
            showDataTypeView.AddChidren(btnShowHistroyData_Total);
            btnShowHistroyData_Total.SetCornerWithSameRadius((uint)Application.GetRealHeight(6), HDLUtils.RectCornerBottomRight | HDLUtils.RectCornerTopRight);
            btnShowHistroyData_Total.MouseUpEventHandler = (sender, e) =>
            {
                if(curQueryType == "total")
                {
                    return;
                }
                (sender as Button).SelectedBackgroundColor = 0x1F5C62FE;
                (sender as Button).BackgroundColor = 0x1F5C62FE;
                (sender as Button).BorderColor = CSS_Color.MainColor;
                (sender as Button).BorderWidth = 2;
                (sender as Button).IsSelected = true;
                btnShowHistroyData_Month.IsSelected = false;
                btnShowHistroyData_Month.BorderWidth = 1;
                btnShowHistroyData_Month.BorderColor = CSS_Color.PromptingColor1;
                btnShowHistroyData_Month.BackgroundColor = 0x00000000;
                btnShowHistroyData_Month.SelectedBackgroundColor = 0x00000000;
                btnShowHistroyData_Year.IsSelected = false;
                btnShowHistroyData_Year.BorderWidth = 1;
                btnShowHistroyData_Year.BorderColor = CSS_Color.PromptingColor1;
                btnShowHistroyData_Year.BackgroundColor = 0x00000000;
                btnShowHistroyData_Year.SelectedBackgroundColor = 0x00000000;
                btnShowHistroyData_Day.IsSelected = false;
                btnShowHistroyData_Day.BorderWidth = 1;
                btnShowHistroyData_Day.BorderColor = CSS_Color.PromptingColor1;
                btnShowHistroyData_Day.BackgroundColor = 0x00000000;
                btnShowHistroyData_Day.SelectedBackgroundColor = 0x00000000;
#if __IOS__
                btnShowHistroyData_Day.SetCornerWithSameRadius((uint)Application.GetRealHeight(6), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerBottomLeft);
                btnShowHistroyData_Total.SetCornerWithSameRadius((uint)Application.GetRealHeight(6), HDLUtils.RectCornerBottomRight | HDLUtils.RectCornerTopRight);
#endif
            };
            btnShowHistroyData_Day.MouseUpEventHandler = (sender, e) =>
            {
                //showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg1.png";
                //btnShowHistroyData_Day.IsSelected = true;
                //btnShowHistroyData_Year.IsSelected = false;
                //btnShowHistroyData_Month.IsSelected = false;
                //curQueryType = "hour";
                //brokenLine.YvalueText = "";
                //foreach (var enery in queryList)
                //{
                //    LoadMothed_GetHistoryData(enery, false);
                //}
                if(curQueryType == "hour")
                {
                    return;
                }
                (sender as Button).SelectedBackgroundColor = 0x1F5C62FE;
                (sender as Button).BackgroundColor = 0x1F5C62FE;
                (sender as Button).BorderColor = CSS_Color.MainColor;
                (sender as Button).BorderWidth = 2;
                (sender as Button).IsSelected = true;
                btnShowHistroyData_Month.IsSelected = false;
                btnShowHistroyData_Month.BorderWidth = 1;
                btnShowHistroyData_Month.BorderColor = CSS_Color.PromptingColor1;
                btnShowHistroyData_Month.BackgroundColor = 0x00000000;
                btnShowHistroyData_Month.SelectedBackgroundColor = 0x00000000;
                btnShowHistroyData_Year.IsSelected = false;
                btnShowHistroyData_Year.BorderWidth = 1;
                btnShowHistroyData_Year.BorderColor = CSS_Color.PromptingColor1;
                btnShowHistroyData_Year.BackgroundColor = 0x00000000;
                btnShowHistroyData_Year.SelectedBackgroundColor = 0x00000000;
                btnShowHistroyData_Total.IsSelected = false;
                btnShowHistroyData_Total.BorderWidth = 1;
                btnShowHistroyData_Total.BorderColor = CSS_Color.PromptingColor1;
                btnShowHistroyData_Total.BackgroundColor = 0x00000000;
                btnShowHistroyData_Total.SelectedBackgroundColor = 0x00000000;
#if __IOS__
                btnShowHistroyData_Day.SetCornerWithSameRadius((uint)Application.GetRealHeight(6), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerBottomLeft);
                btnShowHistroyData_Total.SetCornerWithSameRadius((uint)Application.GetRealHeight(6), HDLUtils.RectCornerBottomRight | HDLUtils.RectCornerTopRight);
#endif
                curQueryType = "hour";
                brokenLine.YvalueText = "";
                LoadMothed_GetHistoryData();
            };
            btnShowHistroyData_Month.MouseUpEventHandler = (sender, e) =>
            {
                //showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg2.png";
                //btnShowHistroyData_Day.IsSelected = false;
                //btnShowHistroyData_Year.IsSelected = false;
                //btnShowHistroyData_Month.IsSelected = true;
                //curQueryType = "week";
                //brokenLine.YvalueText = "";
                //foreach (var enery in queryList)
                //{
                //    LoadMothed_GetHistoryData(enery, false);
                //}
                if(curQueryType == "month")
                {
                    return;
                }
                (sender as Button).SelectedBackgroundColor = 0x1F5C62FE;
                (sender as Button).BackgroundColor = 0x1F5C62FE;
                (sender as Button).BorderColor = CSS_Color.MainColor;
                (sender as Button).BorderWidth = 2;
                (sender as Button).IsSelected = true;
                btnShowHistroyData_Day.IsSelected = false;
                btnShowHistroyData_Day.BorderWidth = 1;
                btnShowHistroyData_Day.BorderColor = CSS_Color.PromptingColor1;
                btnShowHistroyData_Day.BackgroundColor = 0x00000000;
                btnShowHistroyData_Day.SelectedBackgroundColor = 0x00000000;
                btnShowHistroyData_Year.IsSelected = false;
                btnShowHistroyData_Year.BorderWidth = 1;
                btnShowHistroyData_Year.BorderColor = CSS_Color.PromptingColor1;
                btnShowHistroyData_Year.BackgroundColor = 0x00000000;
                btnShowHistroyData_Year.SelectedBackgroundColor = 0x00000000;
                btnShowHistroyData_Total.IsSelected = false;
                btnShowHistroyData_Total.BorderWidth = 1;
                btnShowHistroyData_Total.BorderColor = CSS_Color.PromptingColor1;
                btnShowHistroyData_Total.BackgroundColor = 0x00000000;
                btnShowHistroyData_Total.SelectedBackgroundColor = 0x00000000;
#if __IOS__
                btnShowHistroyData_Day.SetCornerWithSameRadius((uint)Application.GetRealHeight(6), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerBottomLeft);
                btnShowHistroyData_Total.SetCornerWithSameRadius((uint)Application.GetRealHeight(6), HDLUtils.RectCornerBottomRight | HDLUtils.RectCornerTopRight);
#endif
                curQueryType = "month";
                brokenLine.YvalueText = "";
                LoadMothed_GetHistoryData();
            };
            btnShowHistroyData_Year.MouseUpEventHandler = (sender, e) =>
            {
                //showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg3.png";
                //btnShowHistroyData_Day.IsSelected = false;
                //btnShowHistroyData_Year.IsSelected = true;
                //btnShowHistroyData_Month.IsSelected = false;
                //curQueryType = "month";
                //brokenLine.YvalueText = "";
                //foreach (var enery in queryList)
                //{
                //    LoadMothed_GetHistoryData(enery, false);
                //}
                if(curQueryType == "year_month")
                {
                    return;
                }
                (sender as Button).SelectedBackgroundColor = 0x1F5C62FE;
                (sender as Button).BackgroundColor = 0x1F5C62FE;
                (sender as Button).BorderColor = CSS_Color.MainColor;
                (sender as Button).BorderWidth = 2;
                (sender as Button).IsSelected = true;
                btnShowHistroyData_Month.IsSelected = false;
                btnShowHistroyData_Month.BorderWidth = 1;
                btnShowHistroyData_Month.BorderColor = CSS_Color.PromptingColor1;
                btnShowHistroyData_Month.BackgroundColor = 0x00000000;
                btnShowHistroyData_Month.SelectedBackgroundColor = 0x00000000;
                btnShowHistroyData_Day.IsSelected = false;
                btnShowHistroyData_Day.BorderWidth = 1;
                btnShowHistroyData_Day.BorderColor = CSS_Color.PromptingColor1;
                btnShowHistroyData_Day.BackgroundColor = 0x00000000;
                btnShowHistroyData_Day.SelectedBackgroundColor = 0x00000000;
                btnShowHistroyData_Total.IsSelected = false;
                btnShowHistroyData_Total.BorderWidth = 1;
                btnShowHistroyData_Total.BorderColor = CSS_Color.PromptingColor1;
                btnShowHistroyData_Total.BackgroundColor = 0x00000000;
                btnShowHistroyData_Total.SelectedBackgroundColor = 0x00000000;
#if __IOS__
                btnShowHistroyData_Day.SetCornerWithSameRadius((uint)Application.GetRealHeight(6), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerBottomLeft);
                btnShowHistroyData_Total.SetCornerWithSameRadius((uint)Application.GetRealHeight(6), HDLUtils.RectCornerBottomRight | HDLUtils.RectCornerTopRight);
#endif
                curQueryType = "year_month";
                brokenLine.YvalueText = "";
                LoadMothed_GetHistoryData();
            };
            #endregion
@@ -206,6 +326,8 @@
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealWidth(330),
                Radius = (uint)Application.GetRealWidth(16),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            contentView.AddChidren(historyDataView);
@@ -216,9 +338,242 @@
            };
            historyDataView.AddChidren(myEchartsView_Line);
            //EnergyRow(energy, energyListView, index);
            var btnTip = new Button()
            {
                Y = Application.GetRealWidth(289),
                Height = Application.GetRealHeight(41),
                Width = Application.GetRealWidth(300),
                TextAlignment = TextAlignment.Center,
                Gravity = Gravity.CenterHorizontal,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextID = StringId.AirSwitchP3HistroyTip1,
            };
            historyDataView.AddChidren(btnTip);
            LoadMothed_GetHistoryData();
            #region A
            contentView.AddChidren(new Button()
            {
                Height = Application.GetRealHeight(12),
            });
            var viewa = new FrameLayout()
            {
                Gravity  = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(52),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                Radius = (uint)Application.GetRealWidth(12),
            };
            contentView.AddChidren(viewa);
            Button btnRighta = new Button()
            {
                X = Application.GetRealWidth(321),
                Gravity = Gravity.CenterVertical,
                Width = Application.GetMinRealAverage(16),
                Height = Application.GetMinRealAverage(16),
                UnSelectedImagePath = "Public/Right.png",
            };
            viewa.AddChidren(btnRighta);
            Button btnTitlea = new Button()
            {
                X = Application.GetRealWidth(16),
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CSS_FontSize.TextFontSize,
                TextColor= 0xFF000000,
                Width = Application.GetRealWidth(300),
                TextID = StringId.RealTimeElectricityConsumptionDataOfPhaseA
            };
            viewa.AddChidren(btnTitlea);
            #endregion
            #region B
            contentView.AddChidren(new Button()
            {
                Height = Application.GetRealHeight(12),
            });
            var viewb = new FrameLayout()
            {
                Gravity  = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(52),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                Radius = (uint)Application.GetRealWidth(12),
            };
            contentView.AddChidren(viewb);
            Button btnRightb = new Button()
            {
                X = Application.GetRealWidth(321),
                Gravity = Gravity.CenterVertical,
                Width = Application.GetMinRealAverage(16),
                Height = Application.GetMinRealAverage(16),
                UnSelectedImagePath = "Public/Right.png",
            };
            viewb.AddChidren(btnRightb);
            Button btnTitleb = new Button()
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(300),
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CSS_FontSize.TextFontSize,
                TextColor = 0xFF000000,
                TextID = StringId.RealTimeElectricityConsumptionDataOfPhaseB,
            };
            viewb.AddChidren(btnTitleb);
            #endregion
            #region C
            contentView.AddChidren(new Button()
            {
                Height = Application.GetRealHeight(12),
            });
            var viewc = new FrameLayout()
            {
                Gravity  = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(52),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                Radius = (uint)Application.GetRealWidth(12),
            };
            contentView.AddChidren(viewc);
            Button btnRightc = new Button()
            {
                X = Application.GetRealWidth(321),
                Gravity = Gravity.CenterVertical,
                Width = Application.GetMinRealAverage(16),
                Height = Application.GetMinRealAverage(16),
                UnSelectedImagePath = "Public/Right.png",
            };
            viewc.AddChidren(btnRightc);
            Button btnTitlec = new Button()
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(300),
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CSS_FontSize.TextFontSize,
                TextColor = 0xFF000000,
                TextID = StringId.RealTimeElectricityConsumptionDataOfPhaseC,
            };
            viewc.AddChidren(btnTitlec);
            #endregion
            btnTitlea.MouseUpEventHandler = (sender, e) => {
                var skipView = new AirSwitchP3SubloopEnergyPage(device,FunctionAttributeKey.ElectricityA);
                MainPage.BasePageView.AddChidren(skipView);
                skipView.LoadPage(StringId.RealTimeElectricityConsumptionDataOfPhaseA);
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            btnTitleb.MouseUpEventHandler = (sender, e) => {
                var skipView = new AirSwitchP3SubloopEnergyPage(device, FunctionAttributeKey.ElectricityB);
                MainPage.BasePageView.AddChidren(skipView);
                skipView.LoadPage(StringId.RealTimeElectricityConsumptionDataOfPhaseB);
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            btnTitlec.MouseUpEventHandler = (sender, e) => {
                var skipView = new AirSwitchP3SubloopEnergyPage(device, FunctionAttributeKey.ElectricityC);
                MainPage.BasePageView.AddChidren(skipView);
                skipView.LoadPage(StringId.RealTimeElectricityConsumptionDataOfPhaseC);
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            #region 总用电量
            var totalElectricityView = new FrameLayout()
            {
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealWidth(183),
                Radius = (uint)Application.GetRealWidth(16),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            //historyDataView.AddChidren(totalElectricityView);
            var btnTotalElectricity = new Button()
            {
                Width = Application.GetRealWidth(300),
                Height = Application.GetRealHeight(55),
                X = Application.GetRealWidth(14),
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                TextColor = 0xFF030D1C,
                TextAlignment = TextAlignment.CenterLeft,
                TextID = StringId.TotalPowerAndUnit,
            };
            totalElectricityView.AddChidren(btnTotalElectricity);
            double totalNumber = 0.00;
            double.TryParse(device.GetAttrState(FunctionAttributeKey.TotalElectricity), out totalNumber);
            var btnTotalNumber = new Button()
            {
                Y = Application.GetRealHeight(27),
                Gravity = Gravity.CenterHorizontal,
                Height = Application.GetRealHeight(167),
                TextSize = 49,
                TextColor = 0xFF030D1C,
                TextAlignment = TextAlignment.Center,
                Text = totalNumber.ToString("F2"),
            };
            totalElectricityView.AddChidren(btnTotalNumber);
            btnShowHistroyData_Day.MouseUpEventHandler += (sender, e) => {
                totalElectricityView.RemoveFromParent();
                historyDataView.AddChidren(myEchartsView_Line);
                //viewa.Visible = true;
                //viewb.Visible = true;
                //viewc.Visible = true;
                btnTip.TextID = StringId.AirSwitchP3HistroyTip1;
                historyDataView.Height = Application.GetRealWidth(330);
            };
            btnShowHistroyData_Month.MouseUpEventHandler += (sender, e) => {
                totalElectricityView.RemoveFromParent();
                historyDataView.AddChidren(myEchartsView_Line);
                //viewa.Visible = true;
                //viewb.Visible = true;
                //viewc.Visible = true;
                btnTip.TextID = StringId.AirSwitchP3HistroyTip2;
                historyDataView.Height = Application.GetRealWidth(330);
            };
            btnShowHistroyData_Year.MouseUpEventHandler += (sender, e) => {
                totalElectricityView.RemoveFromParent();
                historyDataView.AddChidren(myEchartsView_Line);
                //viewa.Visible = false;
                //viewb.Visible = false;
                //viewc.Visible = false;
                btnTip.TextID = StringId.AirSwitchP3HistroyTip3;
                historyDataView.Height = Application.GetRealWidth(330);
            };
            btnShowHistroyData_Total.MouseUpEventHandler += (sender, e) => {
                myEchartsView_Line.RemoveFromParent();
                historyDataView.AddChidren(totalElectricityView);
                //viewa.Visible = false;
                //viewb.Visible = false;
                //viewc.Visible = false;
                historyDataView.Height = Application.GetRealHeight(184);
            };
            #endregion
        }
@@ -247,18 +602,21 @@
                    });
                    var sensorType = device.spk.Split(".")[1];
                    var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType, device.deviceId, "power_a");
                    var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType, device.deviceId, FunctionAttributeKey.TotalElectricity);
                    if (revertObj != null)
                    {
                        if (revertObj.Code == StateCode.SUCCESS)
                        {
                            var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<EnvironmentalSensorHistor>>(revertObj.Data.ToString());
                            if (revertData == null || revertData.Count == 0) {
#if DEBUG
                            if (revertData == null || revertData.Count == 0) {
                                List<string> vs = new List<string>() {
                                    "813","313","213","123",
                                    "113","213","183","133",
                                    "133","513","133","413",
                                    "1","2","3","4",
                                    "5","6","7","8",
                                    "9","10","11","12",
                                    //"13","14","15","16",
                                    //"17","18","19","20",
                                    //"21","22","23","24",
                                };
                                    brokenLine.InitXdataText(vs);
                                revertData = new List<EnvironmentalSensorHistor>()
@@ -280,11 +638,11 @@
                                {
                                    device.attributes.Add(new FunctionAttributes() { key = "ydata" });
                                }
                                device.SetAttrState("ydata", brokenLine.InitYdataText(device.name, revertData, "#5C62FE") + ", ");
                                device.SetAttrState("ydata", brokenLine.InitYdataText2(device.name, revertData, "#5C62FE", curQueryType == "year_month") + ", ");
                        }
                        else
#endif
                            }
                            else
                            {
                                List<string> vs = new List<string>();
                                if (brokenLine.YvalueText == "")
@@ -299,18 +657,18 @@
                                {
                                    device.attributes.Add(new FunctionAttributes() { key = "ydata" });
                                }
                                device.SetAttrState("ydata", brokenLine.InitYdataText(device.name, revertData, "#5C62FE") + ", ");
                                device.SetAttrState("ydata", brokenLine.InitYdataText2(device.name, revertData, "#5C62FE", curQueryType == "year_month") + ", ");
                            }
                        }
                    }
                    brokenLine.yTitle = Language.StringByID(StringId.EnergyConsumption) + "(kW)";
                    brokenLine.yTitle = Language.StringByID(StringId.Uint) + "(KW·h)";
                    brokenLine.xTitle = Language.StringByID(StringId.timeMode);
                    if (curQueryType != "hour")
                    {
                        brokenLine.xTitle = Language.StringByID(StringId.Date);
                    }
                    var opString = brokenLine.InitOption(30);
                    var opString = brokenLine.InitOption(100, curQueryType == "year_month");
                    Application.RunOnMainThread(() =>
                    {
                        myEchartsView_Line.ShowWithOption(opString);