API Documentation -> NtApplication

# NtApplication Interface

The interface NtApplication should be implemented by applications or Forms that make use of the NtTimeChartControl. Typically you implement this interface in your Form class. Then inside your Form's Load() method assign the interface to your NtTimeChartControl like this:

myNtTimeChartControl.SetNtApplication( this );

The NtTimeChartControl then calls the interface methods to retrieve certain information like tooltip texts for objects or if a certain date is a holiday.

Interface Methods:

Modifier / Return Value | Name and Parameters | Description
--- | --- | ---
string | NtGetBitmap ( NtDataObject ntDo ) | Whenever a data object shall be displayed as a bitmap of flexible size, the NtTimeChartControl needs to get the Bitmap for this object. So it will call this interface method to call your code. You will retreive the NtDataObject as a parameter. Your data is contained in the NtDataObject.dataItem member, so you can return the correct Bitmap.
string | NtGetDouble ( NtDataObject ntDo ) | Whenever data objects shall be displayed as a curve plot, the NtTimeChartControl needs to know the double value of each of the objects. So it will call this interface method to call your code. You will retreive the NtDataObject as a parameter. Your data is contained in the NtDataObject.dataItem member, so you can return the correct double value.
string | NtGetIcon ( NtDataObject ntDo ) | Whenever data objects shall be displayed as a icons (which technically are Bitmaps), the NtTimeChartControl needs to get the Bitmap for this object. So it will call this interface method to call your code. You will retreive the NtDataObject as a parameter. Your data is contained in the NtDataObject.dataItem member, so you can return the correct Bitmap to make up the icon.
string | NtGetText ( NtDataObject ntDo ) | Whenever a data object shall be displayed as text, the NtTimeChartControl needs to know the string to draw. So it will call this interface method to call your code. You will retreive the NtDataObject as a parameter. Your data is contained in the NtDataObject.dataItem member, so you can compose the text properly. In most cases you simply return ntDo.dataItem.ToString().
string | NtGetTooltipText ( NtDisplayObject tooltipDisplayObject, int ttType ) | The NtTimeChartControl calls this method whenever it wants to create a tooltip for a NtDisplayObject (which is the object that is drawn on the screen in behalf of the NtDataObject). You should implement this method and use the NtDataObject reference contained in that NtDisplayObject to create a tooltip text. Depending on the ttType this should be either a plain text or a HTML string that is then shown as tooltip contents.
bool | NtIsHoliday ( DateTime dt ) | The NtTimeChartControl calls this method with any date. You should return true if this date is a holiday in the understanding of your application. The NtTimeChartControl can use this information to set specific colors for day columns.
bool | NtIsWeekend ( DateTime dt ) | The NtTimeChartControl calls this method with any date. You should return true if this date is a weekend day in the understanding of your application. The NtTimeChartControl can use this information to set specific colors for day columns.

Top API Documentation -> NtApplication © 2016 Bassaly