Table Of Contents

Vvidget ServerDictionary ► Bar Chart

This section explains how to form an input string for a bar chart such as these:

Format
1; fill_color=AAAA001; With Labels, no fill color
2, no fill color3

The input string has this form:

chart_type=3&chart_subtype=0&chart_format_type=1&data_values=v1 v2 ... vN&fill_color=RRGGBBAA&label_1=string&label_2=string&templates=string

The following table defines the input string key and value pairs:

Chart Specific Entries
KeyValue Description
chart_type¹The chart type is always 3 (aliased to bar), indicating a bar chart.
chart_subtype¹The chart subtype is always 0. (aliased to default)
chart_format_type¹The chart format type is an index from 1 to 3 (aliased to {default , alternate, extruded}) which produces the varied results of the figures above.
titleThe main title of the graph. If this key is not present then the template's title is used.
x_titleThe x title of the graph. If this key is not present then the template's x-title is used.
y_titleThe y title of the graph. If this key is not present then the template's y-title is used.
data_valuesA white space delimited list of values representing the length of the bar. See Data Oriented keys for additional information and keys.
label_IA string for the I-th label value. I starts at 1.
fill_colorA hex encoded representation of a RGBA color value. This only is in effect for format type 1. If this key is not present then the color table template is used.
fill_color_IA hex encoded representation of a RGBA color value for the I-th bar. I starts at 1 (example: fill_color_2=FF0000 assigns the 2nd bar to a red fill color). This entry overrides the fill_color and the table color specifications.
templatesA custom Templates directory.

If you incorporate this functionality into your web site please consult Web URL.

You can also modify the following Templates:

Template Document Names
TemplateDescription
PVST_Bar_ChartForms the static attributes for this chart type when there are no label keys.
PVST_Custom_Label_Bar_ChartForms the static attributes for this chart type when there is at least one label key. The left margin is greater to accommodate longer labels.
PVST_bar_color_tableForms the bar color attributes for odd format type indices.
PVST_bar_color_table_1Forms the bar color attributes for even format type indices.

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
NameDescription
PVST_Bar_Chart_attributesMain server side attributes.

Other examples

Group bars can be formed by using the data_I keys instead of the data_values key. Here is an example:




© Copyright 1993-2020 by VVimaging, Inc. (VVI); All Rights Reserved. Please email support@vvi.com with any comments you have concerning this documentation. See Legal for trademark and legal information.