public static ChartProperties getChartProperties(int max, bool steppedPBR) { ChartProperties props=new ChartProperties(); props.XAxisType = XAxisTypeEnum.datetime; props.XValueFormatString = "dd.MM HH:mm"; ChartAxisProperties pAx=new ChartAxisProperties(); pAx.ProcessAuto = true; pAx.Auto = true; pAx.Min = 0; pAx.Max = max; pAx.Interval = 10; pAx.MinHeight = 10; pAx.Index = 0; ChartAxisProperties vAx=new ChartAxisProperties(); vAx.Auto = true; vAx.Index = 1; props.addAxis(pAx); props.addAxis(vAx); ChartSerieProperties FaktSerie=new ChartSerieProperties(); FaktSerie.Color = "0-0-255"; FaktSerie.Title = "Факт"; FaktSerie.TagName = "Fakt"; FaktSerie.LineWidth = 2; FaktSerie.SerieType = ChartSerieType.stepLine; FaktSerie.YAxisIndex = 0; FaktSerie.Enabled = true; ChartSerieProperties PlanSerie=new ChartSerieProperties(); PlanSerie.Color = "0-255-0"; PlanSerie.Title = "План"; PlanSerie.TagName = "Plan"; PlanSerie.LineWidth = 1; PlanSerie.SerieType = steppedPBR ? ChartSerieType.stepLine : ChartSerieType.line; PlanSerie.YAxisIndex = 0; PlanSerie.Enabled = true; props.addSerie(FaktSerie); props.addSerie(PlanSerie); return props; }
public static ChartProperties getChartProperties(bool steppedPBR) { ChartProperties props=new ChartProperties(); props.XAxisType = XAxisTypeEnum.datetime; props.XValueFormatString = "dd.MM HH:mm"; ChartAxisProperties pAx=new ChartAxisProperties(); pAx.Auto = true; pAx.Min = 0; pAx.Max = 1050; pAx.Interval = 50; pAx.Index = 0; ChartAxisProperties vAx=new ChartAxisProperties(); vAx.Auto = true; vAx.Index = 1; props.addAxis(pAx); props.addAxis(vAx); ChartSerieProperties gtp1FaktSerie=new ChartSerieProperties(); gtp1FaktSerie.Color = "0-255-0"; gtp1FaktSerie.Title = "ГТП-1 факт"; gtp1FaktSerie.TagName = "gtp1Fakt"; gtp1FaktSerie.LineWidth = 2; gtp1FaktSerie.SerieType = ChartSerieType.stepLine; gtp1FaktSerie.YAxisIndex = 0; gtp1FaktSerie.Enabled = true; ChartSerieProperties gtp2FaktSerie=new ChartSerieProperties(); gtp2FaktSerie.Color = "0-0-255"; gtp2FaktSerie.Title = "ГТП-2 факт"; gtp2FaktSerie.TagName = "gtp2Fakt"; gtp2FaktSerie.LineWidth = 2; gtp2FaktSerie.SerieType = ChartSerieType.stepLine; gtp2FaktSerie.YAxisIndex = 0; gtp2FaktSerie.Enabled = true; ChartSerieProperties gesFaktSerie=new ChartSerieProperties(); gesFaktSerie.Color = "0-0-0"; gesFaktSerie.Title = "ГЭС факт"; gesFaktSerie.TagName = "gesFakt"; gesFaktSerie.LineWidth = 2; gesFaktSerie.SerieType = ChartSerieType.stepLine; gesFaktSerie.YAxisIndex = 0; gesFaktSerie.Enabled = false; ChartSerieProperties gtp1PlanSerie=new ChartSerieProperties(); gtp1PlanSerie.Color = "0-255-0"; gtp1PlanSerie.Title = "ГТП-1 план"; gtp1PlanSerie.TagName = "gtp1Plan"; gtp1PlanSerie.LineWidth = 1; gtp1PlanSerie.SerieType = steppedPBR?ChartSerieType.stepLine:ChartSerieType.line; gtp1PlanSerie.YAxisIndex = 0; gtp1PlanSerie.Enabled = true; ChartSerieProperties gtp2PlanSerie=new ChartSerieProperties(); gtp2PlanSerie.Color = "0-0-255"; gtp2PlanSerie.Title = "ГТП-2 план"; gtp2PlanSerie.TagName = "gtp2Plan"; gtp2PlanSerie.LineWidth = 1; gtp2PlanSerie.SerieType = steppedPBR ? ChartSerieType.stepLine : ChartSerieType.line; gtp2PlanSerie.YAxisIndex = 0; gtp2PlanSerie.Enabled = true; ChartSerieProperties gesPlanSerie=new ChartSerieProperties(); gesPlanSerie.Color = "0-0-0"; gesPlanSerie.Title = "ГЭС план"; gesPlanSerie.TagName = "gesPlan"; gesPlanSerie.LineWidth = 1; gesPlanSerie.SerieType = steppedPBR ? ChartSerieType.stepLine : ChartSerieType.line; gesPlanSerie.YAxisIndex = 0; gesPlanSerie.Enabled = false; ChartSerieProperties vyrabFaktSerie=new ChartSerieProperties(); vyrabFaktSerie.Color = "255-0-0"; vyrabFaktSerie.Title = "Выработка факт"; vyrabFaktSerie.TagName = "vyrabFakt"; vyrabFaktSerie.LineWidth = 2; vyrabFaktSerie.SerieType = ChartSerieType.stepLine; vyrabFaktSerie.YAxisIndex = 1; vyrabFaktSerie.Enabled = true; ChartSerieProperties vyrabPlanSerie=new ChartSerieProperties(); vyrabPlanSerie.Color = "255-0-0"; vyrabPlanSerie.Title = "Выработка план"; vyrabPlanSerie.TagName = "vyrabPlan"; vyrabPlanSerie.LineWidth = 1; vyrabPlanSerie.SerieType = ChartSerieType.stepLine; vyrabPlanSerie.YAxisIndex = 1; vyrabPlanSerie.Enabled = true; props.addSerie(gtp1FaktSerie); props.addSerie(gtp2FaktSerie); props.addSerie(gesFaktSerie); props.addSerie(gtp1PlanSerie); props.addSerie(gtp2PlanSerie); props.addSerie(gesPlanSerie); props.addSerie(vyrabPlanSerie); props.addSerie(vyrabFaktSerie); return props; }
public ChartProperties createChartProperties() { ChartProperties props=new ChartProperties(); props.XAxisType = XAxisTypeEnum.datetime; ChartAxisProperties pAx=new ChartAxisProperties(); pAx.Min = 0; pAx.Max = 1020; pAx.Auto = false; pAx.Interval = 100; pAx.Index = 1; ChartAxisProperties nbAx=new ChartAxisProperties(); nbAx.Auto = true; nbAx.Interval = 0.1; nbAx.Index = 0; ChartAxisProperties qAx=new ChartAxisProperties(); qAx.Auto = false; qAx.Min = 0; qAx.Max = 7200; qAx.Index = 2; ChartAxisProperties vbAx=new ChartAxisProperties(); vbAx.Auto = true; vbAx.Index = 3; ChartAxisProperties naporAx=new ChartAxisProperties(); naporAx.Auto = true; naporAx.Index = 4; ChartAxisProperties tAx=new ChartAxisProperties(); tAx.Auto = false; tAx.Min = -40; tAx.Max = 40; tAx.Index = 5; ChartSerieProperties pSerie=new ChartSerieProperties(); pSerie.Color = "0-0-255"; pSerie.LineWidth = 2; pSerie.SerieType = ChartSerieType.line; pSerie.Title = "P факт"; pSerie.TagName = "PFakt"; pSerie.YAxisIndex = 1; ChartSerieProperties pbrSerie=new ChartSerieProperties(); pbrSerie.Color = "0-0-255"; pbrSerie.LineWidth = 1; pbrSerie.SerieType = ChartSerieType.line; pbrSerie.Title = "ПБР"; pbrSerie.TagName = "PBR"; pbrSerie.YAxisIndex = 1; ChartSerieProperties nbFaktSerie=new ChartSerieProperties(); nbFaktSerie.Color = "255-0-0"; nbFaktSerie.LineWidth = 2; nbFaktSerie.SerieType = ChartSerieType.line; nbFaktSerie.Title = "НБ факт"; nbFaktSerie.TagName = "NBFakt"; nbFaktSerie.YAxisIndex = 0; ChartSerieProperties nbPrognozSerie=new ChartSerieProperties(); nbPrognozSerie.Color = "255-0-0"; nbPrognozSerie.LineWidth = 1; nbPrognozSerie.SerieType = ChartSerieType.line; nbPrognozSerie.Title = "НБ прогноз"; nbPrognozSerie.TagName = "NBPrognoz"; nbPrognozSerie.YAxisIndex = 0; ChartSerieProperties qFaktSerie=new ChartSerieProperties(); qFaktSerie.Color = "0-255-0"; qFaktSerie.LineWidth = 2; qFaktSerie.SerieType = ChartSerieType.line; qFaktSerie.Title = "Q факт"; qFaktSerie.TagName = "QFakt"; qFaktSerie.YAxisIndex = 2; ChartSerieProperties qPrognozSerie=new ChartSerieProperties(); qPrognozSerie.Color = "0-255-0"; qPrognozSerie.LineWidth = 1; qPrognozSerie.SerieType = ChartSerieType.line; qPrognozSerie.Title = "Q прогноз"; qPrognozSerie.TagName = "QPrognoz"; qPrognozSerie.Enabled = false; qPrognozSerie.YAxisIndex = 2; ChartSerieProperties vbSerie=new ChartSerieProperties(); vbSerie.Color = "0-255-255"; vbSerie.LineWidth = 2; vbSerie.SerieType = ChartSerieType.line; vbSerie.Title = "ВБ"; vbSerie.TagName = "VB"; vbSerie.Enabled = false; vbSerie.YAxisIndex = 3; ChartSerieProperties naporSerie=new ChartSerieProperties(); naporSerie.Color = "255-0-255"; naporSerie.LineWidth = 2; naporSerie.SerieType = ChartSerieType.line; naporSerie.Title = "Напор"; naporSerie.TagName = "Napor"; naporSerie.Enabled = false; naporSerie.YAxisIndex = 4; ChartSerieProperties naporPrognozSerie=new ChartSerieProperties(); naporPrognozSerie.Color = "255-0-255"; naporPrognozSerie.LineWidth = 1; naporPrognozSerie.SerieType = ChartSerieType.line; naporPrognozSerie.Title = "Напор прогноз"; naporPrognozSerie.TagName = "NaporPrognoz"; naporPrognozSerie.Enabled = false; naporPrognozSerie.YAxisIndex = 4; ChartSerieProperties tSerie=new ChartSerieProperties(); tSerie.Color = "120-0-255"; tSerie.LineWidth = 2; tSerie.SerieType = ChartSerieType.line; tSerie.Title = "Температура"; tSerie.TagName = "T"; tSerie.Enabled = false; tSerie.YAxisIndex = 5; props.addAxis(pAx); props.addAxis(nbAx); props.addAxis(qAx); props.addAxis(vbAx); props.addAxis(naporAx); props.addAxis(tAx); props.addSerie(pSerie); props.addSerie(pbrSerie); props.addSerie(nbFaktSerie); props.addSerie(nbPrognozSerie); props.addSerie(qFaktSerie); props.addSerie(qPrognozSerie); props.addSerie(vbSerie); props.addSerie(naporSerie); props.addSerie(naporPrognozSerie); props.addSerie(tSerie); props.XAxisType = XAxisTypeEnum.datetime; return props; }