[{"id":"425f2be4-b65d-4cdf-b543-fb4397f51672","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"a1041c29-1f9f-497e-b577-3e673e487c51","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"c1e3b2a0-7159-4980-a5e1-4fbb04c7fcc1","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"128acbbc-5c49-416b-9c1f-91f679362b23","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"3bc7a653-1dd3-4a33-b35c-41b0ddc2f446","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"cecedb46-bf12-401c-a04c-5282e11b8274","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"2f1768df-3e8b-41c2-826e-93f1a82273d1","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"d9528848-3bae-42c1-8f6d-410a78341cef","tags":[{"product":null,"links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e","name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"2683b3de-5c23-429d-9a88-4917616d20ad","tags":[{"product":null,"links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e","name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"b96827a0-6bd4-4184-86a4-6fe503d0e4b4","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"96d2140c-5bb6-49b6-a4c7-4af4b7de2e52","tags":[{"product":null,"links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e","name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"11f27d32-9547-4a8c-9e88-5dd2bffffeda","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"d186bc7e-cbae-4d23-9cd9-a54880be8e4d","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"26754bf1-707e-4815-b6d3-dcdc87a59188","tags":[{"product":null,"links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e","name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"e4c0a89e-cceb-4863-a30a-dff94f1d8d08","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"c4f826a6-5d16-4399-8f1a-7b8449594941","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"ff2b9815-2596-47f7-8793-3585c9ee24a2","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"46851ce2-51a2-4af4-969d-9fe989997135","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"e3e87330-5250-4923-9cdf-e7e8afd353ab","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"a04db983-f77b-4ec6-857c-1c01afaed85a","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"434eed34-9059-46e4-88f9-15e47d09622c","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"30988f2a-ebd5-4a8c-b20e-54a11a528d30","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"a59719c8-0df2-44e1-b89c-9d8fa0312857","tags":[{"product":null,"links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e","name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"4be1ecee-287b-43a2-ba99-cfa89de88187","tags":[{"product":null,"links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e","name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"ea04cced-7866-48e5-a5fe-1e9f11004d59","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"ab17d080-0112-4ba4-8dae-ef367bec7b78","tags":[{"product":null,"links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e","name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]}]
        
(Showing Draft Content)

Line Plot

Line plots are suitable for tracking changes in an Data Value over time or compare changes over the same period for multiple data values. By default, a line plot arranges a period horizontally, encodes data values into points called Symbols, along the vertical axis, and connects them by line segments. If the Swap Axes flag of the Line Plot is set, then the plot arranges a period vertically and puts Symbols along the horizontal axis.

Single Line Plot

A single line plot visualizes changes of one data value.


For instance, the Single Line Demo shows changes of some product returns over the year.



Multiple Line Plot

A multiple-line plot allows you to split data values into subcategories for a more granular analysis of changes.


For example, the Multiple Line Demo shows changes of the Net Sales of some product over the year for the online and store sales channels.



Multiple Values Line Plot

You could also display changes of multiple related or unrelated data values over the same period. For instance, the Multiple Values Line Demo shows how the Net Sales, the Cost of Goods Sold, and the Net Income change over the year for some product.




You can configure all these types using the Line plot template and its properties described in the following sections. The Smooth Line template is just a shortcut to a pre-configured Line Aspect property value.


You can use the following demos to explore plot properties - open a link, toggle the Report explorer, select the Plot - Plot 1 node and use the Properties panel to modify the configuration.

You could also download the report files listed below and open them in the Standalone Report Designer.

Chart Wizard

If you add a chart into a report, set the plot type to Line on the first page of the Chart Wizard, and click the Next button, the wizard shows the Line Settings page that looks like the following:


Chart Wizard for Line Plots


The Data Values section allows you to add one or more Data Values.

The Data Categories section allows you to set the Category Encoding.

The Data Subcategories section allows you to configure the Details Encoding.

Data Values

The Line plot's Values collection determines data values that change over time. The Chart Wizard displays the Values collection as Fields in the Data Values section. Collection items consist of two properties:

  • The Value is usually a bound field reference. The Properties Panel displays the Value as the collection, but Line plots take the first item only. The Chart Wizard displays the Value as Field.

  • The Aggregate is an optional function, such as Count or Average, that reduces many field values into a single one.

Multiple data values generate multiple lines, as in the Multiple Values Line Demo. You can switch the Show Values Names In Legend flag to supply the plot with a color legend that displays the match between line colors and corresponding data value names. You can set the displayed name by using the Caption property of a data value item.

Category Encoding

The Category Encoding of a Line plot is a set of properties that determine the period over which the plot generates connected data points representing those above Data Values.

  • The Category is usually a bound field reference. Bound DataSet Records with the same value of that field fall into the same category. Distinct categories form the period. For instance, the Single Line Demo is bound to the Sales DataSet containing the Return Quantity and SalesDate fields for each data record. The plot's Category is set to {MonthName(Month(SalesDate))} expression. Therefore the plot goes through the Sales DataSet, finds the distinct months from the SalesDate values, and generates one category per month. If you preview the Single Line Demo output, you can see 12 months along the horizontal axis.

  • The Category Sort configuration determines the order of the category values appearance. For instance, the plot in the Single Line Demo has Category Sort Expression = {Month(SalesDate)}, Category Sort Direction = Ascending settings to ensure chronological order.

The Chart Wizard offers the simplified editor of the Categories Encoding in the Data Categories section:

  • A single Category Expression displayed as Field is available.

  • The Category Sorting configuration only displays the Sort direction property. The Sort Expression is automatically set to the same value as the Field property has.

Details Encoding

The Details Encoding allows you to break down those above Data Values into subcategories for more granular analysis of changes.


The Details property of a Line plot is the collection of items that determine these subcategories. Each item includes several properties:

  • The Values is usually one or more bound field references. Bound DataSet Records with the same values of these fields fall into the same subcategory. For instance, in the Multiple Line Demo the Details value is {ChannelKey}. Consequently, the Sales Amount of each month splits into the Online and Store subcategories that each generate a data point.

  • The Exclude Nulls flag indicates whether DataSet Records with an undefined Details Value should be excluded from the visualization.


    • The Sorting configuration determines the order of sub-categories' appearance.

The Chart Wizard offers the simplified editor of the Details Encoding in the Data Subcategories section:

  • A single Details Encoding item is available.

  • A single Value item displayed as Field is available.

  • The Sorting configuration of the Details Encoding displays the Sort direction property only. The Sort Expression is automatically set to the Field value.

Colors Encoding

The Colors Encoding enables the color legend of the Category Encoding or Details Encoding and includes the Color expression and the optional Color Aggregate function that reduces many Color values into a single one.


Suppose the Details Encoding is empty. In that case, a Line plot calculates distinct Color Encoding results for the categories produced by the Category Encoding and converts them to the background color of the corresponding symbols.


Otherwise, the plot calculates distinct Color Encoding results for the subcategories produced by the Details Encoding and converts them to the color of the corresponding lines.


In both cases, the plot picks up colors from the Chart Palette and displays the match between colors and encoding results in the legend.


For instance, the colors encoding in the Multiple Line Demo uses the {ChannelName} expression. Consequently, the report output shows the colors legend that matches Channel Names with corresponding line colors.


Note: Reset the Line Color property in the Style section to get the Colors Encoding worked.


Note: The Color property is the collection, but the Line plot takes the first item only.

Shape Encoding

The Shape Encoding enables the shape legend of the Category Encoding or Details Encoding and includes the Shape expression and the optional Shape Aggregate function that reduces many Shape values into a single one.


Suppose the Details Encoding is empty. In that case, a Line plot calculates distinct Shape Encoding results for the categories produced by the Category Encoding and converts them to the shape of the corresponding symbol.


Otherwise, the plot calculates distinct Shape Encoding results for the subcategories produced by the Details Encoding and converts them to the corresponding symbols' shape.


You can try setting the Shape expression to {ChannelName} for the Multiple Line Demo. Consequently, the plot will use different symbols for the online and store channels.


Note: Set the Symbol Shape property of the Line Plot to Auto to get the Shape Encoding worked.




Note: The Shape property is the collection, but the Line plot takes the first item only.

Size Encoding

The Size Encoding configuration enables the size legend and includes the Size expression and the optional Size Aggregate function that reduces many Size values into a single one. The Size Encoding works only with numeric values and breaks down data values into ranges that determine the size of symbols. It allows you to encode additional information in a line chart.


You can try setting the Size expression to {SalesAmount} and the Size Aggregate to Count for the Multiple Line Demo so that the plot would visualize the number of sales in each month using the size of the symbols.




Note: The Size property is the collection, but the Line plot takes the first item only.

Line and Symbols look-and-feel

The following properties allow you to fine-tune the outfit of symbols and lines that form the Line plot. You can see their effect in action by modifying the configuration of any line demo.


The Opacity and Symbol Opacity are numbers in percentage that determine the opacity of the line and symbols, respectively. 100% means they are opaque, and 0% means that they are entirely transparent.


The Line Aspect property determines the style of the line that connects data points.

  • Default means the straight line

  • Spline means the bezier curve

  • Step Center, Step Left and Step Right mean the stepped line with different step directions. You can try these values with the Single Line Demo to see the difference between them.

The Show Nulls property indicates the arrangement of data points for Null values.

  • Gaps means that the plot will not draw line segments between a null data point and its previous and next points

  • Zero means that null data points will be considered to have 0 value

  • Connected means that the plot will connect the previous and the next points of a null point

The Clipping Mode indicates the manner that the plot area draws a plot:

  • Fit value means that the plot area should use all the available space to fit the plot

  • Clip value means that the plot area cuts off the plot on the edge of its right or bottom padding

  • None value equals to Fit

The line properties in the Style section overwrite any other line color settings, including the Color Encoding that we described earlier.


The line properties, the Background Color expression, the Symbol Shape and the Show Symbols flag allow you to set up the appearance of symbols. If the Symbol Shape is Auto, then the plot either picks the default value or applies the Shape Encoding that we described earlier.

Customizing Tooltips and Labels

The Text Encoding collection offers a way to configure line plots to display customized labels and tooltips on the data point symbols. Each item within this collection has the following properties:

  • Values: This is an expression that can reference the values of the bound fields.

  • Aggregate: This optional function, such as Count or Average, can condense multiple field values into a single value, evaluated within the current detail or category context.

  • Template Key: A string used within the Labels or Tooltip template to represent the text encoding item.

  • Target: This property specifies whether the text encoding item is meant for the plot's labels or tooltips.

Adding items to the Text Encoding collection allows automatic display of configured values in Labels or Tooltips, based on the Target value of each item. To further customize the text of the labels and tooltips, you can employ the Tooltip Template and Label Text Template expressions.

Apart from Text Encoding items referenced by their keys, you can utilize the following pre-defined values:

  • {valueField.name}: Represents the field name bound to a Data Value.

  • {valueField.value}: Represents the current Data Value within the containing Category or Details.

  • {PercentageDetail}: Represents the percentage share of the current Data Value among all values within the same Details.

  • {PercentageCategory}: Represents the percentage share of the current Data Value among all values within the same Category.

  • {categoryField.name}: Represents the field name bound to the Category Encoding.

  • {categoryField.value}: Represents the current Category Encoding value.

  • {detailFields.name}: Represents the field name bound to the Details Encoding.

  • {detailFields.value}: Represents the current Details Encoding value.

  • {colorField.name}: Represents the field name bound to the Color Encoding.

  • {colorField.value}: Represents the current Color Encoding value.

  • {shapeField.name} Represents the field name bound to the Shape Encoding.

  • {shapeField.value} Represents the current Shape Encoding value.

  • {sizeField.name} Represents the field name bound to the Size Encoding.

  • {sizeField.name} Represents the current Size Encoding value.

These values can be combined and formatted using the interpolation syntax and supported format strings that are also used for the TextBox Report Item. For instance, you can set the Label Text Template to {valueField.value:C2} in the Multiple Line Demo to display Net Sales Amount as currency.

For example, the plot in the Multiple Line Demo uses an advanced tooltip configuration:

  • The Text Encoding contains the SalesQuantity element that displays the number of sold items:

    • Aggregate = Sum

    • Value = {SalesQuantity}

    • Target = Tooltip

    • TemplateKey = SalesQuantity

  • The Tooltip Template is configured with the following expression:

Quantity: {SalesQuantity}
Amount : {valueField.value:C2}

Labels Appearance

A subset of text properties in the Label Text section and the line properties in the Label Border section allow you to set up the corresponding visual parameters of the plot labels.


The Label Position and an optional Offset in pixels determine the location of labels relative to a parent data point symbol:

  • Inside - inside

  • Outside - on the top

  • Center - on the center

  • Auto - equals to Outside

The Overlapping Labels property indicates the handling of overlapping labels. Possible values are:

  • Auto - hides some labels to prevent the overlapping

  • Show - shows all labels even if the overlapping persists

The line properties in the Label Line section allows you to add the connecting lines between labels and their parent data points. The Label Line Position determines the connection point of a label's bounding box and the line:

  • Auto - selected automatically

  • Center - on the center of the bounding box side

Dynamic Rules

The Rules configuration allows you to create if this then that rules based on one or more data conditions to apply to the plot appearance. A condition is an expression that may refer to one of the following values:

  • Chart!CurrentData - the current Data Value

  • Chart!PreviousData - the previous Data Value

  • Chart!NextData - the next Data Value

  • Chart!CurrentCategory - the current Category Encoding value

  • Chart!PreviousCategory - the previous Category Encoding value

  • Chart!NextCategory - the next Category Encoding value

  • Chart!CurrentDetail - the current Details Encoding value

  • Chart!PreviousDetail - the previous Details Encoding value

  • Chart!NextDetail - the next Details Encoding value

A condition expression can also include references to report parameters and standard operators. The easiest way to build a condition is to use the expression editor that you can open by click on the box on the right side of the Condition property.


The following visual properties of a Line plot can be applied when a condition is met:

  • The background color of a data point symbol

  • The border color of a data point symbol

  • The border width of a data point symbol

  • The border style of a data point symbol

  • The tooltip and label template

For instance, you can set the following rules for the plot in the Multiple Line Demo to apply a custom formatting for the peak data points (the ones that are greater than the both the previous and the next data points).




As a result, the output of the chart will be like this:



Action

This group of properties determine the Interactive Action when a report reader clicks a data point symbol. You can use bound field references to pass parameters in a drill-through report or configure a dynamic bookmark or URL. The field value is evaluated in the scope of the current detail or category. Visit the Drill-Through Reports Walkthrough for more information. It explains how to set up the drill-through column plot, but the same technique is applicable for a line plot.