System and method using metalanguage keywords to generate charts6223189Abstract A charting metalanguage for uniquely defining a chart to be generated by a computer. The charting metalanguage comprises a plurality of keywords and subkeywords that define the components of the chart. A keyword is preceded by an indicator such as a slash symbol and describes a major characteristic of the chart such as the type of chart, the type of font to be used or the title of the chart. An optional subkeyword follows the keyword. A text and/or data string may follow the subkeyword and/or be positioned between the keyword and the subkeyword. Claims What is claimed is: Description TECHNICAL FIELD
Title font, color
Subtitles font, color
Footnote font, color
Domain title font, color
Range title font, color
Legend title font, color
Domain labels font, color
Range labels font, color
Legend labels font, color
Data labels font, color
Data colors
The types of modifications that can be made in these chart elements are: Font: The modifications include face name, point size, modifiers (bold and/or italic) Color: The modifications include background, foreground Colors: The modifications include legend item colors The types of charts that can be created using the metalanguage include pie charts, table charts, area charts, text charts, bar charts, donut charts, line charts, multicolumn charts, bullet charts and column charts. The definitions of these chart types used in the preferred embodiment, are given below. However, it should be appreciated that the definition of a particular type of chart can be modified as needed. The AREA chart will work like a line chart with the area between the X-axis and the line filled in with the color associated with the legend element. The AREA chart has three styles: NORMAL which causes later drawn legend elements to overlay previously drawn data, STACKED which causes the previous legend element to be the base line for the current legend element and the current legend element drawn with its values summed with its baseline, and PERCENT where each legend element represents its percentage of the entire height of the chart. In all cases the area between the current legend element line and its base line is filled in with the legend element's color. The BAR chart displays data in a histogram with the rectangles growing from the Y-axis over toward the right of the chart. It displays the number of domain elements defined by the RANGEELEMENTS control. The BAR chart has three styles: NORMAL which shows side-by-side (with optional overlap) rectangles for each legend element separated by optional space between the domain elements, STACKED where each legend element is abutted to the right of its predecessor in the domain element, and PERCENT where each legend element describes its percentage of the sum of the entire domain element and the legend elements are abutted with the right being at the maximum width of the chart. BULLET charts display textual (alphanumeric) data in an indented list format. The data is in two columns, the first represents the level of indentation but is not displayed, and the second is the data to be displayed visually. The COLUMN chart displays data in a histogram with the rectangles growing from the X-axis up toward the top of the chart. It displays the number of domain elements defined by the DOMAINELEMENTS control. The COLUMN chart has three styles: NORMAL which shows side-by-side (with optional overlap) rectangles for each legend element separated by optional space between the domain elements, STACKED where each legend element is stacked on top of its predecessor in the domain element, and PERCENT where each legend element describes its percentage of the sum of the entire domain element and the legend elements are stacked with the top being at the maximum height of the chart. The DONUT chart preserves the distinction of legend data within domain data elements. The chart is displayed as concentric rings, one per domain item. The chart starts with the first legend item of the each domain aligned on a starting position, say on the X-axis line of the first quadrant of a Cartesian graph. Each legend item then fills its percentage of the whole circle. The LINE chart draws each legend element as a line representing the range value of each domain element across the chart for as many elements as specified by DOMAINELEMENTS. The LINE chart has three styles: NORMAL which causes later drawn legend elements to overlay previously drawn data, STACKED which causes the previous legend element to be the base line for the current legend element and the current drawn with its values summed with its baseline, and PERCENT where each legend element represents its percentage of the entire height of the chart. MULTICOLUMN text charts display textual (alphanumeric) data as a spread sheet type matrix. The data is displayed in columns under headings which are the DOMAINLABELs. The PIE chart displays the data as a circle with each domain element being denoted by its percentage of the total circle. If multiple legend elements comprise a domain element, then the entire domain element is the sum of the legend elements. For example, if the chart were displaying first, second, and third quarter results, then the normal circle would have three segments. If, however, the data were additionally broken down into widgets one and two, each quarter would display the sum of their widgets. In so doing, the distinction between the widgets per quarter is lost. If this is unacceptable, the DONUT chart preserves this distinction. In the preferred embodiment, the keywords and subkeywords listed in FIG. 2 have the following definitions: The COLOR element allows the changing and setting of colors for various control elements, such as titles and labels. Format: COLOR [element] [n, foreground color, background color] [color [, color [, . . . ]] {n.vertline.1 . . . 6} EXAMPLE /color title foreground black background darkgray to set title text to black on a dark gray background. The CHART element begins the definition of a new chart. Format: CHART [numeric, text] [column, pie, bar, . . . ] [normal, stacked, percent] At least one DEPTH control element needs to have been processed prior to the first CHART control element. EXAMPLE /chart area percent to create an area chart with the data spread out to represent a percentage. The DATA keyword has the following meaning: All of the data for a chart, either numeric or text, will consist of a sequence of strings. If the chart is a numeric chart, these values will be converted to their numeric equivalents; text will be handled as is. DATA control elements will be read sequentially and applied to the data in the following way:
DOMAIN[0]LEGEND[0], DOMAIN[1]LEGEND[0], . . . DOMAIN[n]LEGEND[0],
DOMAIN[0]LEGEND[1], DOMAIN[1]LEGEND[1], . . . DOMAIN[n]LEGEND[1],
. . .
. . .
. . .
DOMAIN[0]LEGEND[m], DOMAIN[1]LEGEND[m], . . . DOMAIN[n]LEGEND[m]
Format: DATA string [, string [, . . . ]]
DATA elements can appear in any order within a chart specification. No particular number of elements need occur with any DATA control line. For example, for a 3.times.4 chart, one DATA control could have twelve elements, or twelve DATA controls could be read from the specification. Missing or extraneous data will be handled per the Error clause. The DOMAINLABEL and LEGENDLABEL controls must be included to specify any number of data elements other than the default of one. For example, if neither appeared, only one element of data would be used for the chart; if either but not both are missing then the number of label elements will specify either the number of domain elements or legend elements with the other being defaulted to one. If both appear, then their number of elements determines the matrix bounds for the data and the number of elements for each. If too few data elements are received, as based on the number of domain labels and the legend labels, the data will be padded with zeroes for numeric and null strings for text charts and a warning message issued to the debug file. If too many elements are received, the data will be ignored and a warning message issued to the debug file. EXAMPLE /data apples, oranges, bananas, passion fruit to specify four data elements, or /data 9.3,20000000,-96.32,7 /data 3.14159 /data 4,44,14 to specify eight data elements for a 1.times.8, 2.times.4, 4.times.2 or 8.times.1 data matrix The DEPTH control element describes the level in which the following charts fit within the hierarchy of all charts. If some charts are sub-parts of a report, they are at the depth level of that report, whereas other charts are sub-parts of another report. While these charts may be at the same depth level, they are under different report levels, therefore, under different parts of the hierarchy. When all the depth levels and charts are described, they form a tree where the leaf nodes are charts and the intermediate nodes are depth levels. Format: DEPTH [+1, -1, n] {n.vertline.1 . . . 16} The first control element needs to be a DEPTH control to begin the hierarchy. Comments are excluded from this requirement. Any control elements that occur prior to the first DEPTH control are discarded with errors logged. EXAMPLES /depth 1 to start a highest level of depth ordering, or /depth to descend to the next level of depth. The DOMAINELEMENTS control describes the maximum number of viewable elements to be described along the range or X-axis when a multicolumn text chart or almost any numeric chart is displayed. Its main intent is to limit the number of items in larger charts to prevent overlapping of labels. Further, if a certain group of data makes sense to display together, this can be used to control the grouping (e.g., for a chart showing monthly statistics, it might be beneficial to set the number to seven to visually group data by weeks). Format: DOMAINELEMENTS [n] {n.vertline.0 . . . 255} If DOMAINELEMENTS specifies an invalid number of elements (i.e., too many, less than one), the actual number of elements is used, as is the case when no number is specified. EXAMPLE /domainelements 7 to view only seven elements across the domain, or /domainelements to view the actual number defined by the DOMAINLABEL control The DOMAINLABEL control contains the text labels that describe each domain element. If no labels are defined, the default is to use a single null string. Format: DOMAINLABEL string [, string [, . . . ]] The DOMAINLABEL control needs to specify the exact number of elements that are used to define the data since it defines one bound of the data matrix. Any errors encountered will cause the control to be discarded, an error message logged, and finally the whole chart to be discarded. EXAMPLES /domainlabel Day 1,Day 2,Day 3,Day 4,Day 5, Day 6, Day 7 to set seven day's names as domain labels The DOMAINTITLE control contains the title that describes the domain elements, typically drawn across the X-axis. Format: DOMAINTITLE string Invalid strings cause the control to be ignored and an error message to be logged. EXAMPLE /domaintitle Quarter to title the domainaxis for quarters The FONT control element specifies font characteristics of the next chart element and remains so until it is changed again or reset when a default element definition is encountered. Format: FONT element [facename] [n] [bold] [italic] [nobold] [noitalic] Element refers to any of the chart elements that use fonts (e.g., title, subtitle, range labels, etc.), If no options are specified, the default behavior is to return to using the default font characteristics of a control element. Otherwise, the current font is changed to the specifications of the FONT control element, overriding the previous settings. When a control element is encountered after a reset (i.e., FONT with no options) the font is overlaid with the new control's font definition and becomes the default font for the particular chart element. If no chart element is specified, an error message is logged and processing continues as if no FONT control was read. If a facename is specified that does not exist, then some matching is attempted. If nothing comes close, the default font is used. EXAMPLE /font title helvetica 14 bold italic to specify a new default font for all following title control elements, or /font title to return to using the title control's defaults, or /font title noitalic to modify the current title font by removing a characteristic FOOTNOTE specifies optional data that will appear at the bottom of the chart. Any duplicate specifications for a footnote will use the last one with the prior one(s) discarded. Footnote data is optional and defaults to null strings and no space reserved on the chart for their display. Format: FOOTNOTE [right, left] string If the width of a footnote or the combined width of both exceed the width of the chart, then the footnotes are left aligned and truncated to the size that fits. If one footnote is less than half the width to the footnote line, but both exceed the width, the shorter will be displayed in its entirety with t other being abutted with a gutter and truncated. EXAMPLE /footnote left Chart creation date 09/05/96 to specify a left aligned, left handed footnote or /footnote right Time: 12:30 /footnote left Date: January 17, 1997 to specify a left aligned, left handed footnote and a right aligned, right handed footnote The LEGENDLABEL describes the text for each item in the legend. It defaults to a single null string. Format: LEGENDLABEL [string [,string . . . ]]] The LEGENDLABEL control defines one bound of the data matrix so it must contain the exact number of legend elements to properly define the data. If any errors are detected with the LEGENDLABEL control, the control is discarded, an error is logged and the whole chart is discarded. EXAMPLE /legendlabel apples,bananas,oranges,strawbarries to set four legend items as fruit. LEGENDTITLE indicates that the legend box can be titled with the supplied text. This would appear above the box and describe the entries. Presumably this would further describe the legend items in a way different than the RANGETITLE would. Format: LEGENDTITLE string EXAMPLE /legendtitle Types of fruit to set legend title to types of fruit The RANGEELEMENTS control describes the maximum number of viewable elements to be described along the range or Y-axis when a multi-column text chart or a bar chart is displayed. Its main intent is to limit the number of items in larger charts to prevent overlapping of labels. Further, if a certain group of data makes sense to display together, this can be used to control the grouping (e.g., for a chart showing monthly statistics, it might be beneficial to set the number to seven to visually group data by weeks). Format: RANGEELEMENTS [n] In {0 . . . 255} If RANGEELEMENTS specifies an invalid number of elements (i.e., too many, less than one), the actual number of elements is used, as is the case when no number is specified. EXAMPLE /rangeelements 10 to limit the number of range data to ten elements. The RANGELABEL keyword allows the specification of range labels for textual (non-numeric) charts. Textual charts can not calculate range labels and therefore they must be specified. These labels will be ignored for numeric charts. Format: RANGELABEL string [, string [, . . . ]] EXAMPLE /rangelabel 1Q,2Q,3Q,4Q to set textual chart range labels to quarters. The RANGETITLE control element describes what is usually known as the Y-axis title. This title describes the range that the data encompasses and what each range increment means. Format: RANGETITLE string Any RANGETITLE element that is read with an invalid text string is discarded and an error message is logged. EXAMPLE /rangetitle Dollars per Bushel to set the range title for the range as dollars/bushel. The SET control element is a miscellaneous, catch-all to collect various and sundry options that need modifying but are not common across all chart types or are not essential elements of a chart. Additional subkeywords that follow the set keyword are shown in FIG. 2. DATALABEL Format: DATALABEL [on.vertline.off.vertline.top.vertline.bottom.vertline.middle.vertline.tot al] AXIS Format: DOMAINAXIS [on.vertline.off] RANGEAXIS [on.vertline.off] LINEWIDTH Format; LINEWIDTH n SEGMENTEXPLODE LEGEND Format: SET option parameter [option parameter [ . . . ]] All options must come in pairs of option parameters with options processed afterwards overriding similar options processed earlier. Invalid options and parameters are discarded and an error message is logged. EXAMPLE /set linewidth 5 to set the line drawing width to five pixels, or /set datalabels top to put datalabels at the top of its associated graphic element /set domainaxis on rangsaxis on to make the data displayable on a background grid A SUBTITLE control element defines a string of text that is displayed under the main title. The subtitles are displayed in sequence that they are read, with each new one centered under the previous; the first is directly under the main title. Format: SUBTITLE string Any SUBTITLE element that has an invalid text string is discarded and an error message logged. EXAMPLE /subtitle Production per Quarter to set a subtitle as production. The TITLE control element describes the main title of a chart. It is separate in its modifiable parts from the subtitles and always is the topmost title in the set of titles and subtitles. Format: TITLE string Any TITLE control that does not have a proper string is discarded and an error logged. EXAMPLE /title Yearly Production of 3.5" Hard disks to set the main title as production. In the preferred embodiment, the charting metalanguage file comprises one or more of the following keywords: filident, rptident, footnote, domaintitle, rangetitle, legendtitle, title, subtitle, chart, domainlabel, rangelabel, legendlabel, data, font, color or set. In a preferred example, the charting metalanguage file includes the keyword "font" immediately preceded by the slash symbol and followed by one or more of the subkeywords selected from the group consisting of title, subtitle, footnote, legendlabel, domaintitle, domainlabel, rangetitle, rangelabel or datalabel. Each keyword is immediately preceded by the slash symbol. A text string follows the subkeyword that specifies at least the font type and font size for the indicated subkeyword. Note that in this example, the subkeywords are keywords functioning as subkeywords because of there position after a keyword. Other preferred keywords include a color keyword that specifies the color of a section of the chart; a domainelement keyword that specifies the maximum number of viewable elements along the x-axis of the chart; a rangeelements keyword that specifies the maximum number of viewable elements along the y-axis of the chart; and a rangetitle keyword that specifies the title to be associated with the y-axis of the chart. In use, the charting metalanguage file is downloaded from the first computer 14 to the second computer 18 where the charting facility program 34 parses the charting metalanguage file. The program 34 then generates a chart having all of the characteristics that were defined by the metalanguage file. Although the present invention has been described in terms of the presently preferred embodiment, it is to be understood that such disclosure is not to be interpreted as limiting. Various alterations and modifications will no doubt become apparent to those skilled in the art after having read the above disclosure. Accordingly, it is intended that the appended claims be interpreted as covering all alterations and modifications as fall within the true spirit and scope of the invention.
|
Same subclass Same class Consider this |
||||||||||
