Line Chart¶
The Line Chart widget displays data in a line chart format. The widget can be used to visualize trends in data.
Line Definitions¶
A line definition specifies a single line within the chart. For each data element matching the XPath property, a new line is created. The line's value is determined by YValueXPath, and its label by LabelXPath.
To display a static label for a line, enclose the desired label text in single quotes within the LabelXPath property. For example, to label a bar with "Sales", set LabelXPath to 'Sales'.
XML Fields¶
XPathestablishes the form-data context.Width,Height, andTitle/Contentcontrol the chart frame and title.XAxisValueFormatandYAxisValueFormatselectNumericorDateformatting for their respective axes.XAxisLabel/ContentandYAxisLabel/Contentsupply their captions.- Each
Lines/Linedefines a series.XPathselects the source collection andDataXPathselects rows within it (*selects direct children). XValueXPathandYValueXPathselect each point's coordinates;LabelXPathsupplies the series label. A quoted label path is a static label.
LineChart only visualizes the selected values. It never writes points, labels, or format settings to the form data.
Example¶
Consider a data model representing incident data:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
The following LineChart configuration would render this data:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | |
This configuration would render a line chart with two lines, one for incidents and one for problems. The chart would display the number of incidents and problems over time, with the X-axis representing the date and the Y-axis representing the count.
