apex:lineSeries

A data series to be rendered as connected points in a linear Visualforce chart. At a minimum you must specify the fields in the data collection to use as X and Y values for each point, as well as the X and Y axes to scale against.

Note: This component must be enclosed within an <apex:chart> component. You can have multiple <apex:barSeries> and <apex:lineSeries> components in a single chart. You can also add <apex:areaSeries> and <apex:scatterSeries> components, but the results might not be very readable.

Example 

1<!-- Page: -->
2<apex:chart height="400" width="700" data="{!data}">
3    <apex:axis type="Numeric" position="left" fields="data1,data2"
4        title="Opportunities Closed" grid="true"/>
5    <apex:axis type="Category" position="bottom" fields="name"
6        title="Month of the Year"/>
7    <apex:lineSeries title="Closed-Won" axis="left" xField="name" yField="data1"
8        fill="true" markerType="cross" markerSize="4" markerFill="#FF0000"/>
9    <apex:lineSeries title="Closed-Lost" axis="left" xField="name" yField="data2"
10        markerType="circle" markerSize="4" markerFill="#8E35EF"/>
11</apex:chart>

Attributes 

Attribute NameAttribute TypeDescriptionRequired?API VersionAccess
axisStringWhich axis this chart series should bind to. Must be one of the four edges of the chart: left, right, top, or bottom The axis bound to must be defined by a sibling <apex:axis> component.Yes23.0
fillBooleanA Boolean value that specifies whether the area under the line should be filled or not. If not specified, this value defaults to false. 23.0
fillColorStringA string that specifies the color to use to fill the area under the line, specified as an HTML-style (hexadecimal) color. If not specified, the fill color matches the line color. Only used if fill is set to true. 26.0
highlightBooleanA Boolean value that specifies whether each point of the series line should be highlighted when the mouse pointer passes over it. If not specified, this value defaults to true. 23.0
highlightStrokeWidthStringA string that specifies the width of the line that is drawn over the series line when it’s highlighted. 26.0
idStringAn identifier that allows the chart component to be referenced by other components on the page. 23.0global
markerFillStringThe color of data point markers for this series, specified as an HTML-style (hexadecimal) color. If not specified, the marker color matches the line color. 23.0
markerSizeIntegerThe size of each data point marker for this series. If not specified, this value defaults to “3”. 23.0
markerTypeStringThe shape of each data point marker for this series. Valid options are: circle or cross If not specified, the marker shape is chosen from a sequence of shapes. 23.0
opacityStringA decimal number between 0 and 1 representing the opacity of the filled area under the line for the series. If not specified, defaults to “0.3”. Only used if fill is set to true. 26.0
renderedBooleanA Boolean value that specifies whether the chart series is rendered in the chart. If not specified, this value defaults to true. 23.0
rendererFnStringA string that specifies the name of a JavaScript function that augments or overrides how each data point is rendered. Implement to provide additional styling or to augment data. 26.0
showInLegendBooleanA Boolean value that specifies whether this chart series should be added to the chart legend. If not specified, this value defaults to true. 23.0
smoothIntegerAn integer specifying the amount of smoothing for the line, with lower numbers applying more smoothing. 0 (zero) disables smoothing, and uses straight lines between the points in the series. 26.0
strokeColorStringA string specifying the color of the line for this series, specified as an HTML-style (hexadecimal) color. If not specified, colors are used in sequence from the chart colorSet or theme. 26.0
strokeWidthStringAn integer specifying the width of the line for this series. 26.0
tipsBooleanA Boolean value that specifies whether to display a tooltip for each data point marker when the mouse pointer passes over it. The format of the tip is <xField>: <yField>. If not specified, this value defaults to true. 23.0
titleStringThe title of this chart series, which is displayed in the chart legend. 23.0
xFieldStringThe field in each record provided in the chart data from which to retrieve the x-axis value for each data point in the series. This field must exist in every record in the chart data.Yes23.0
yFieldStringThe field in each record provided in the chart data from which to retrieve the y-axis value for each data point in the series. This field must exist in every record in the chart data.Yes23.0

See Also