/// <summary> /// Plot the hourly precipitation !!!! /// </summary> /// <param name="ts"></param> /// <param name="myPane"></param> private void PlotPrecipHour(ITimeSeries ts, GraphPane myPane) { DateTime MinDate, MaxDate; if (ts.Count > 0) { TimeSeries ts1 = (TimeSeries)ts.AggregateHourly(); MinDate = ts1.Start; MaxDate = ts1.End; //Main creation of curve double totalDays = (MaxDate.Subtract(MinDate)).TotalDays; if (totalDays < 2) { BarItem myCurve = myPane.AddBar("srážky", ts1, Color.Blue); myCurve.Bar.Border.Color = Color.Blue; myCurve.Bar.Border.IsVisible = true; myCurve.Bar.Fill.Type = FillType.Solid; myCurve.Bar.Fill.IsScaled = false; } else { StickItem myCurve = myPane.AddStick("srážky", ts1, Color.Blue); } //cumulative precipitation.. if (ts != null) { TimeSeries ts2 = (TimeSeries)ts.ShowCumulative(); LineItem myCurve2 = myPane.AddCurve("suma srážek", ts2, Color.Red, SymbolType.None); myCurve2.IsY2Axis = true; myPane.AxisChange(); } } }