Top  | Previous | Next

header_logo Line Graph

The Line Graph line-chart is a DataSet element like the table. It shows a graphical representation of data in the form of a line, area or scatter garph.

Populating data including the concepts of data keys, sorting, and filtering are nearly identical to that of a table.

 

Example

The Line Graph component is used to display data where the X value is time or numeric, and the Y value(s) are numeric. Lets set up a graph for some timeseries data. Suppose you have a table with data like this:

linegraph_data

The t_stamp column is your X value, and the other columns are your "pens" or series of Y values. You get this data into a report by binding a DataSet property of the report viewer (see Concepts > Basic > Dynamic Properties) to a SQL query, such as SELECT t_stamp, temperature, pressure FROM graph_data. Lets say that you had this data in the default Data property.

You set up the Line Graph's data the same way you would a Graph or Table. The only trick is that the keys needs to be a comma separated list of keys, with the first one being your X value. Lastly, make sure that the data is sorted ascending by the X value. The following setup:

 

linegraph_setup

... will produce a line chart like this:

linegraph_demo_line

 

 

Line Graph Settings

Basic graph settings can be found on the Graph Tab of the line graph shape specific inspector.

Graph Menu Item

Function

Graph Type

Choose Line chart_style_line, Area chart_style_area, or Scatter chart_style_scatter type graph.

Timeseries

If true, the X axis (first Key) should be a date/time. If false, the X axis should be a number.

Show Legend

Displays a legend with the name of each series (each Key besides the first one.

Show Domain Axis

If true, the domain axis (X axis) will be shown.

Domain Axis Label

The label for the domain axis. Date axes may automatically display additional label information to disambiguate certain ranges.

Show Range Axis

If true, the range axis (Y axis) will be shown.

Range Axis Label

The label for the range axis.

Range Axis Min, Max

Leave blank for automatic, or specify a range like 0,100

btnColors

Drag colors to define graph series colors.

 

Embedding Graphs in a table row

Graphs can be embedded in table rows. Leave the Dataset Key blank to have access to the data provided at that level of grouping! This technique is demonstrated in Tutorial #2.

Since a graph is generally a large shape, you usually want to define an explicit page break for the row that contains the graph, so that the graph won't get chopped off on a page boundary. Select the light gray region to the left of the Group in the Table inspector to do this.