Hi Luiz,
ChartDirector for ASP/COM/VB includes and example for VB6 as follows:
https://www.advsofteng.com/doc/cdcom.htm#realtimedemo.htm
For VB.NET, you can simply translate the VB6 code to VB.NET syntax:
' Add a red mark line to the chart, with the mark label shown at the left of
' the mark line.
Dim m As Mark
m = c.yAxis().addMark(thresholdValue, &HFF0000, "Alarm = " & thresholdValue)
m.setAlignment(Chart.Left)
m.setBackground(&HFFCCCC)
If dataSeries3(UBound(dataSeries3)) > thresholdValue Or _
dataSeries2(UBound(dataSeries2)) > thresholdValue Then
' Add an alarm message as a custom text box on top-right corner of the
' plot area if the latest data value exceeds threshold.
c.addText(575, 62, "Alarm - Latest Value Exceeded Threshold", _
"Arial Bold", 10, &HFFFFFF, Chart.TopRight).setBackground(&HDD0000)
End If
' Fill the region above the threshold as semi-transparent red (80ff8888)
c.addInterLineLayer(layer.getLine(1), m.getLine(), &H80FF8888, Chart.Transparent)
c.addInterLineLayer(layer.getLine(2), m.getLine(), &H80FF8888, Chart.Transparent)
Regards
Peter Kwan |