main | documentation | examples | common questions | changes | licensing


EASYCHARTS DOCUMENTATION   :   TIMELINECHART

1. Input and Output Formats
  1.1 setting input format
  1.2 setting input format locale
  1.3 setting output format
2. Loading Chart Data
  2.1 upper and lower time
  2.2 setting time scale
  2.3 setting time plots
3. Time Labels
  3.1 turning on time labels
  3.2 setting time labels explicitly


All parameters from the LineChart can also be used in the TimeLineChart. Parameters specified in this document are TimeLineChart specific.

To create a simple Time Line chart follow theese steps:
    1. Set format of the input parameters.
    2. Set upper and lower time of the time axis.
    3. Set scaling of the time axis.
    4. Set your data.

CHART PARAMETERS
autoTimeLabelsOn
lowerTime
timeFormatInput
timeFormatInputLocale
timeFormatOut
timeFormatOutLocale
timeLabels
timePlots_N
timeScale
upperTime

TIMELINECHART PARAMETERS
timePlots_N
Sets the x|y plots for the specified series, where x is a datetime string, y is the value and N is series. The x and y values must be delimited by |, and the datetime string must be in the format specified by timeFormatInput.
<param name="timePlots_0" value="2005-02-01|52.2,2005-02-02|52.2,2005-02-03|19.8">
<param name="timePlots_1" value="2005-02-01|29.6,2005-02-02|61.9,2005-02-03|64.9">
setTimePlots(0, new String[] {"2005-02-01|52.2","2005-02-02|52.2","2005-02-03|19.8"});
setTimePlots(1, new String[] {"2005-02-01|29.6","2005-02-02|61.9","2005-02-03|64.9"});
timePlots_0=2005-02-01|52.2,2005-02-02|52.2,2005-02-03|19.8 timePlots_1=2005-02-01|29.6,2005-02-02|61.9,2005-02-03|64.9
lowerTime
Sets the start time of the time axis. The time string must be in the format specified in the timeFormatInput parameter.
<param name="lowerTime" value="2005-02-01">
setLowerTime("2005-02-01");
endAngle=2005-02-01
upperTime
Sets the stop time of the time axis. The time string must be in the format specified in the timeFormatInput parameter.
<param name="upperTime" value="2005-02-03">
setUpperTime("2005-02-03");
upperTime=2005-02-03
timeFormatInput
Sets the format of the input date time parameters. <param name="timeFormatInput" value="yyyy-MM-dd">
setTimeFormatInput(0, "yyyy-MM-dd");
timeFormatInput=yyyy-MM-dd
timeFormatInputLocale
Sets the locale of the input date time parameters (example, en,us). <param name="timeFormatInputLocale" value="en,us">
setTimeFormatInputLocale("en,us");
timeFormatInputLocale=en,us
timeFormatOut
Sets the display format of the time labels. <param name="timeFormatOut" value="MM/dd/yyyy">
setTimeFormatOut("MM/dd/yyyy");
timeFormatOut=MM/dd/yyyy
timeFormatOutLocale
Sets the locale of the output date time parameters (example, en,us). <param name="timeFormatOutLocale" value="en,us">
setTimeFormatOutLocale("en,us");
timeFormatOutLocale=en,us
timeScale
Sets the scaling of the time axis in number of seconds. The default value is 1 which means that each step on the x-axis is one second. If you set the timeScale to 60 each step on the axis will be one minute. If you set the timeScale to 3600, each step will be one hour, and so on. <param name="timeScale" value="84600">
setTimeScale(84600); // 24 hours
timeScale=84600
autoTimeLabelsOn
If you turn this on, labels will automatically be added to the x-axis at each plot point.
<param name="autoTimeLabelsOn" value="true">
setAutoTimeLabelsOn(true);
autoTimeLabelsOn=true
timeLabels
Adds time labels at the plot points indicated by the time labels. <param name="timeLabels" value="2005-02-01,2005-02-02,2005-02-03">
setTimeLabels(new String[] {"2005-02-01","2005-02-02","2005-02-03"});
timeLabels=2005-02-01,2005-02-02,2005-02-03

CHART USER GUIDE


1. Input and Output Formats

1.1 Setting input format

Use timeFormatInput parameter to set the format of the input parameters.

<applet code=com.objectplanet.chart.ChartApplet
archive=chart.ext.jar width=250 height=150>
<param name=chart value=time_line>
<param name=timePlots_0 value="2005-02-01|52.2,2005-02-02|52.2,2005-02-03|19.8,2005-02-04|76.0,2005-02-05|76.0,2005-02-06|43.7,2005-02-07|43.7,2005-02-08|100">
<param name=timeFormatInput value="yyyy-MM-dd">
<param name=timeScale value=86400>
<param name=lowerTime value="2005-02-01">
<param name=upperTime value="2005-02-08">
</applet>

1.2 Setting input format locale

Use timeFormatInputLocale to sets the locale of the input date time parameters.

<applet code=com.objectplanet.chart.ChartApplet
archive=chart.ext.jar width=250 height=150>
<param name=chart value=time_line>
<param name=timePlots_0 value="1 Febrero 2005|52.2,2 Febrero 2005|52.2,3 Febrero 2005|19.8,4 Febrero 2005|76.0,5 Febrero 2005|76.0,6 Febrero 2005|43.7,7 Febrero 2005|43.7,8 Febrero 2005|100">
<param name=timeFormatInput value="dd MMM yyyy">
<param name=timeFormatInputLocale value="es,es">
<param name=timeScale value=86400>
<param name=lowerTime value="1 Febrero 2005">
<param name=upperTime value="8 Febrero 2005">
</applet>

1.3 Setting output format

Use timeFormatOut parameter to set the output format of the labels.

<applet code=com.objectplanet.chart.ChartApplet
archive=chart.ext.jar width=250 height=150>
<param name=chart value=time_line>
<param name=lowerTime value="2005-02-01">
<param name=upperTime value="2005-02-08">
<param name=timeScale value=86400>
<param name=timePlots_0 value="2005-02-01|52.2,2005-02-02|52.2,2005-02-03|19.8,2005-02-04|76.0,2005-02-05|76.0,2005-02-06|43.7,2005-02-07|43.7,2005-02-08|100">
<param name=timeFormatInput value="yyyy-MM-dd">
<param name=timeFormatOut value="dd MMM">
<param name=autoTimeLabelsOn value="true">
<param name=sampleLabelAngle value=270>
</applet>


1. Loading Chart Data

2.1 Upper and lower time

Use upperDate and lowerDate parameters to set start and stop times of the time axis.

<applet code=com.objectplanet.chart.ChartApplet
archive=chart.ext.jar width=250 height=150>
<param name=chart value=time_line>
<param name=timeFormatInput value="yyyy-MM-dd">
<param name=lowerTime value="2005-02-01">
<param name=upperTime value="2005-02-08">
<param name=timeScale value=86400>
<param name=timePlots_0 value="2005-02-01|52.2,2005-02-02|52.2,2005-02-03|19.8,2005-02-04|76.0,2005-02-05|76.0,2005-02-06|43.7,2005-02-07|43.7,2005-02-08|100">
</applet>

2.2 Setting time scale

Use timeScale parameter to set the scaling of the time axis in number of seconds. Set 1 for 1 second, 60 for one minute, 3600 for one hour, 86400 for 24 hours, and so on.

<applet code=com.objectplanet.chart.ChartApplet
archive=chart.ext.jar width=250 height=150>
<param name=chart value=time_line>
<param name=timeFormatInput value="yyyy-MM-dd">
<param name=lowerTime value="2005-02-01">
<param name=upperTime value="2005-02-08">
<param name=timeScale value=86400>
<param name=timePlots_0 value="2005-02-01|52.2,2005-02-02|52.2,2005-02-03|19.8,2005-02-04|76.0,2005-02-05|76.0,2005-02-06|43.7,2005-02-07|43.7,2005-02-08|100">
</applet>

2.3 Setting time plots

Use timePlots_N parameter to add time plot series to the chart. N is index of the series. Use seriesCount parameter to control the number of data series.

<applet code=com.objectplanet.chart.ChartApplet
archive=chart.ext.jar width=250 height=150>
<param name=chart value=time_line>
<param name=seriesCount value=2>
<param name=timeFormatInput value="yyyy-MM-dd">
<param name=lowerTime value="2005-02-01">
<param name=upperTime value="2005-02-08">
<param name=timeScale value=86400>
<param name=timePlots_0 value="2005-02-01|52.2,2005-02-02|52.2,2005-02-03|19.8,2005-02-04|76.0,2005-02-05|76.0,2005-02-06|43.7,2005-02-07|43.7,2005-02-08|100">
<param name=timePlots_1 value="2005-02-01|88.7,2005-02-02|89.7,2005-02-03|27.4,2005-02-04|60.0,2005-02-05|55.3,2005-02-06|70.4,2005-02-07|65.6,2005-02-08|60.8">
</applet>


3. Time Labels

3.1 Turning on time labels

Use autoTimeLabelsOn parameters to turn on the time labels.

<applet code=com.objectplanet.chart.ChartApplet
archive=chart.ext.jar width=250 height=150>
<param name=chart value=time_line>
<param name=lowerTime value="2005-02-01">
<param name=upperTime value="2005-02-08">
<param name=timeScale value=86400>
<param name=timePlots_0 value="2005-02-01|52.2,2005-02-02|52.2,2005-02-03|19.8,2005-02-04|76.0,2005-02-05|76.0,2005-02-06|43.7,2005-02-07|43.7,2005-02-08|100">
<param name=timeFormatInput value="yyyy-MM-dd">
<param name=timeFormatOut value="dd MMM">
<param name=autoTimeLabelsOn value=true>
<param name=sampleLabelAngle value=270>
</applet>

3.2 Setting time labels explicitly

Use timeLabels parameters to set only desired time labels.

<applet code=com.objectplanet.chart.ChartApplet
archive=chart.ext.jar width=250 height=150>
<param name=chart value=time_line>
<param name=lowerTime value="2005-02-01">
<param name=upperTime value="2005-02-08">
<param name=timeScale value=86400>
<param name=timePlots_0 value="2005-02-01|52.2,2005-02-02|52.2,2005-02-03|19.8,2005-02-04|76.0,2005-02-05|76.0,2005-02-06|43.7,2005-02-07|43.7,2005-02-08|100">
<param name=timeFormatInput value="yyyy-MM-dd">
<param name=timeFormatOut value="dd MMM">
<param name=sampleLabelAngle value=270>
<param name=timeLabels value="2005-02-01,2005-02-03,2005-02-05,2005-02-07,2005-02-09">
</applet>



Copyright (C) 1998-2010 ObjectPlanet, Inc.
phone (+47) 2233 3360 fax (+47) 2233 3361