var oTView = pMe.Items("../TrendView");
var oGridTime = oTView.GridTime;
var oGridValue = oTView.GridValue;
oGridTime.Visible = true;
oGridTime.LineType = 2;
oGridTime.Width = 1;
oGridTime.Color = "#0000ff";
// color setting by RGB String in the form "#RRGGBB"
oGridTime.Ticks.AlignType = 3;
// vertical grid lines alignment to the absolute value
oGridTime.Ticks.AlignValue = 1/4;
// alignment to the value 06:00:00 of the time axis
oGridTime.Ticks.CountType = "count";
oGridTime.Ticks.CountValue = 4;
// number of lines is 4
oGridValue.Visible = true;
oGridValue.LineType = 3;
oGridValue.Width = 1;
oGridValue.Color = "#0000ff";
// color setting by RGB String in the form "#RRGGBB"
oGridValue.Ticks.AlignType = 3;
// vertical grid lines alignment to the absolute value
oGridValue.Ticks.AlignValue = 0;
// alignment to the value 0 of the value axis (Y)
oGridValue.Ticks.CountType = "distancevalue";
oGridValue.Ticks.CountValue = 200;
// distance of two lines is 200 on the value scale