ChartDirector 7.0 (Java Edition)

Chart.CTime


Usage

public static double CTime(java.util.Date time)

Description

Converts a java.util.Date to ChartDirector's date/time format.

In common date/time charts, the x-axis represents dates/times, while the y-axis represents numeric data. For these cases, ChartDirector provides overloaded methods that supports both numeric values and java.util.Date values as inputs.

However, it is possible in some special applications, both x and y-axes can represent dates/times. ChartDirector supports this type of usage, but its API only allows "double precision numbers" as y-value inputs. In these cases, CTime can be used to convert java.util.Date to ChartDirector's date/time format, which uses double precision numbers to represent dates/times.

Arguments

ArgumentDefaultDescription
time(Mandatory)A java.util.Date object.

Return Value

A number representing dates/time in ChartDirector's date/time format.