Author |
Topic  |
|
Sumin-Park
21 Posts |
Posted - 30 Jan 2009 : 03:33:39
|
When executing the attached code, I'd like to increase the size of alarm symbol. Please let me know how to change the size of the symbol.
RTProcessVar processVar1; processVar1 = new RTProcessVar("PV01", new ChartAttribute(Color.SpringGreen, 1.0, DashStyle.Solid, Color.SpringGreen)); processVar1.MinimumValue = -10; processVar1.MaximumValue = 110;
RTAlarm lowalarm = new RTAlarm(ChartObj.RT_ALARM_LOWERTHAN, 30); lowalarm.AlarmMessage = "Low A"; lowalarm.AlarmSymbolColor = Color.Blue;
RTAlarm highalarm = new RTAlarm(ChartObj.RT_ALARM_GREATERTHAN, 70); highalarm.AlarmMessage = "High A"; highalarm.AlarmSymbolColor = Color.Red; processVar1.AddAlarm(highalarm);
RTAlarm setupoint = new RTAlarm(ChartObj.RT_SETPOINT_VALUE, 50); setupoint.AlarmMessage = "OK"; setupoint.AlarmSymbolColor = Color.SpringGreen; processVar1.AddAlarm(setupoint);
processVar1.SetCurrentValue( 40);
Font font7Numeric = new Font("Digital SF", 60, FontStyle.Regular);
ChartView chartVu = this;
//CartesianCoordinates pTransform1 = new CartesianCoordinates(-0.1, 0.0, 1.1, 100.0); CartesianCoordinates pTransform1 = new CartesianCoordinates(0.0, 0.0, 90.1, 1);
pTransform1.SetGraphBorderDiagonal(0.1, .1, 0.9, 0.8);
Background background = new Background(pTransform1, ChartObj.PLOT_BACKGROUND, Color.White); chartVu.AddChartObject(background);
ChartAttribute attrib1 = new ChartAttribute(Color.Green, 10, DashStyle.Solid, Color.Green); double barwidth = .45, barbase = 0.5; int barjust = ChartObj.JUSTIFY_MIN; int barorient = ChartObj.HORIZ_DIR;
LinearAxis baraxis = new LinearAxis(pTransform1, ChartObj.X_AXIS); baraxis.CalcAutoAxis(); chartVu.AddChartObject(baraxis);
NumericAxisLabels barAxisLab = new NumericAxisLabels(baraxis); barAxisLab.SetTextFont(font7Numeric); chartVu.AddChartObject(barAxisLab);
RTBarIndicator barplot = new RTBarIndicator(pTransform1, processVar1, barwidth, barbase, attrib1, barjust, barorient); barplot.IndicatorSubType = ChartObj.RT_BAR_SOLID_SUBTYPE;
RTAlarmIndicator baralarms = new RTAlarmIndicator(baraxis, barplot); chartVu.AddChartObject(baralarms);
ChartAttribute panelmeterattrib = new ChartAttribute(Color.SteelBlue, 1, DashStyle.Solid, Color.Black); //RTNumericPanelMeter panelmeter = new RTNumericPanelMeter(pTransform1, processVar1,panelmeterattrib); //panelmeter.PanelMeterPosition = ChartObj.OUTSIDE_PLOTAREA_MIN; //panelmeter.NumericTemplate.TextFont = Form1.font7Numeric; //panelmeter.NumericTemplate.DecimalPos = 0; //barplot.AddPanelMeter(panelmeter);
//RTAlarmPanelMeter panelmeter2 = new RTAlarmPanelMeter(pTransform1, processVar1,panelmeterattrib); //panelmeter2.PanelMeterPosition = ChartObj.BELOW_REFERENCED_TEXT; //panelmeter2.AlarmTemplate.TextFont = Form1.font7Numeric; //panelmeter2.AlarmIndicatorColorMode = ChartObj.RT_TEXT_BACKGROUND_COLOR_CHANGE_ON_ALARM; //panelmeter2.SetPositionReference( panelmeter); //barplot.AddPanelMeter(panelmeter2);
//ChartAttribute panelmetertagattrib = new ChartAttribute(Color.SteelBlue,1,DashStyle.Solid, Color.White); //RTStringPanelMeter panelmeter3 = new RTStringPanelMeter(pTransform1, processVar1, panelmetertagattrib, ChartObj.RT_TAG_STRING); //panelmeter3.PanelMeterPosition = ChartObj.OUTSIDE_PLOTAREA_MAX; //panelmeter3.TextColor = Color.Black; //panelmeter3.StringTemplate.TextFont = Form1.font7; //barplot.AddPanelMeter(panelmeter3); chartVu.AddChartObject(barplot);
When executing the attached code, I'd like to increase the size of alarm symbol. Please let me know how to change the size of the symbol.
f |
|
quinncurtis
1586 Posts |
Posted - 30 Jan 2009 : 08:56:24
|
RTAlarmIndicator baralarms = new RTAlarmIndicator(baraxis, barplot);
baralarms.ChartObjAttributes.SymbolSize = 18;
chartVu.AddChartObject(baralarms); |
 |
|
Sumin-Park
21 Posts |
Posted - 31 Jan 2009 : 00:03:06
|
thank you
f |
 |
|
|
Topic  |
|
|
|