ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  How to represent missing DateTime values in ChartDirector?
Posted by Miles on Jul-19-2019 15:45
Dear support,

In ChartDirector "public const double NoValue = 1.7E+308;" can represent missing values.

But what how can i represent the missing DateTime value?

Thanks

  Re: How to represent missing DateTime values in ChartDirector?
Posted by Peter Kwan on Jul-19-2019 19:25
Hi Miles,

From your last message, it seems you are working on a zoomable and scrollable chart with viewport control, in which the DateTime is used as the x-coordinates. If this is the case, I suggest you can simply skip that array element. There is no requirement that the x-coordinates must be equally spaced. If for some reason, you must keep the array element, you can set it to the last DateTime value plus 0.01 second after the last DateTime, and set the data values of the lines to Chart.NoValue for that particular DateTime.

The zoomable and scrollable sample code is written in a way that assumes the timestamps are incrementing. (Part of the code uses "binary search" which requires the timestamps to be incrementing instead of randomly ordered.) The existence of Chart.NoValue in the timestamps will affect that assumption.

Regards
Peter Kwan

  Re: How to represent missing DateTime values in ChartDirector?
Posted by Miles on Jul-20-2019 13:19
Hi Peter,

Thanks for your detailed feedback. I'll come back later on this thread once I have settled for a solution.

  Re: How to represent missing DateTime values in ChartDirector?
Posted by Miles on Jul-20-2019 13:52
Hi Peter,

Your solution works like a charm, thanks !