We often get requests from customers about how they can display the time value of the cursor on a Trend Control object during runtime. There is no default capability built in to the Trend Control object to do this. However, there is a feature that allows you to store the time value of the cursor in a string-type tag. You can then display the tag value on your screen using whatever object you choose.
In order to get the time value of the cursor, you must open the object properties of your Trend Control and click Axes as highlighted below.
The Axes properties is opened. Click Cursor as highlighted below.
The Cursor properties is opened. Type the name of a string-type tag in the field called Value output as highlight below.
The tag should have Local scope if you have users using Web Thin Client or Secure Viewer. You can then create a Text object, Text Box object, Rectangle, etc. to display the tag to the user.
Many users have also asked about how they can display the cursor time on the Trend Control on or near the actual cursor. The project included at the end of this post is one example of how this can be done. It includes a transparent Trend Control object and a Rectangle used to display the cursor time. The Rectangle is aligned with the cursor near the top of the Trend Control using a Position animation and the cursor property of the Trend Control called Position (0-100). The project was developed in InduSoft Web Studio 7.0 SP1 with Patch 2 and can be opened in that version or any newer version.
Like all of our sample applications, this application is provided as-is for you to use. If you have comments or questions, then please post them in this topic of the forum.