Vvidget Server ► Dictionary ► Date Graph
This section explains how to form an input string for a date graph such as these:
Format | |
Type-1, line_color=000000 | Type-1, no line_color |
The input string has this form:
chart_type=2&chart_subtype=0&chart_format_type=2&title=string&x_title=string&y_title=string&data_1=x1 y1 x2 y2 ... xN yN&data_2=x1 y1 x2 y2 ... xN yN&data_3=x1 y1 x2 y2 ... xN yN&line_color=RRGGBBAA&templates=string
A date graph scales from fractional seconds to millennia and formats accordingly. There is some explicit scale information in its display. For example, you cannot interpret seconds whole numbers as MM/DD/YYYY values.
The following table defines the input string key and value pairs:
Chart Specific Entries | |
Key | Value Description |
chart_type¹ | The chart type is always 6 (aliased to date), indicating a date graph. |
chart_subtype¹ | The chart subtype is always 0 (aliased to linear). |
chart_format_type¹ | An index from 1 to 2 (aliased to {default, alternate}) as shown above. |
title | The main title of the graph. If this key is not present then the template's title is used. |
x_title | The x title of the graph. If this key is not present then the template's x-title is used. |
y_title | The y title of the graph. If this key is not present then the template's y-title is used. |
data_I | A white space delimited list of values representing the x and y values of points in a sequence for curve index I where I starts at 1. The x values are in units of seconds from 1970 and the y values are unitless. See Data Oriented keys for additional information and keys. |
line_color | A hex encoded representation of a RGBA color value for the line color. If this key is not present then the color table template is used. |
start_period_seconds | The seconds that corresponds to the left boundary of the PVS_period_graphic. If this key is not present then 28800 (8am) is used. If the value is sunrise then the seconds at sunrise is used. |
end_period_seconds | The seconds that corresponds to the right boundary of the PVS_period_graphic. If this key is not present then 18000 (5pm) is used. If the value is sunset then the seconds at sunset is used. |
templates | A custom Templates directory. |
Note: The main title is aligned to the left and the x-axis title is turned off in the template. If you need different results you must modify the template.
If you incorporate this functionality into your web site please consult Web URL.
You can also modify the following Templates:
Template Document Names | |
Template | Description |
PVST_Date_Chart | Forms the static attributes for this chart type. |
PVST_2Y_Date_Graph | Forms the static attributes for a two y-axis graph. The y-axis can be of any type (linear, log, etc.) that can be made in a template. |
PVST_date_color_table | Forms the line colors for odd format type indices. |
PVST_date_color_table_1 | Forms the line colors for even format type indices. |
This Date graph image maker inherits the Vvidget prototype definitions of the Line Graph image maker. In addition, the following are vvidget name components in the template that can be used to adjust graphical attributes of the respective parts specific to a date graph.
Vvidget Names | |
Name | Description |
PVS_period_graphic | The optional period graphic prototype (usually a rectangle). If this graphic is present then it will be repeated across the graph. The width of each repetition is defined by the start_period_seconds and end_period_seconds keys. The period is modulo one day. This graphic prototype must reside on the graph's (foreground) data layer. |
PVS_start_date_label | The optional start date text graphic (a Label graphic). Is present, the start date of the graph is inserted in the text of this graphic. This date is often useful when the graph only shows a few hours because the labels are formatted in hours:minutes:seconds and there is no absolute date information presented otherwise. |
The following Server Side Attributes define additional non-graphic attributes. A file with this name in the templates directory will alter the parameters that appear in the attribute file.
Server Side Attributes Names | |
Name | Description |
PVST_Date_Graph_attributes | Main server side attributes. |