To draw a curved line in the line chart, you must set the value of the form attribute to "curve" in the <Line2DSeries> element tag.
... <Line2DSeries labelPosition="up" yField="Beef" form="curve" displayName="Beef" itemRenderer="CircleItemRenderer" showValueLabels="[3,5]"> ... </Line2DSeries> ...
All of the other attributes in the above sample code, such as labelPosition, yField, form, displayName, itemRenderer and showValueLabels in the <Line2DSeries> element tag are applied to draw the line and its features ( how to display labels, how to draw the item displayed at the data points in the line, etc. ) of the data series, and are explained as below:
|labelPosition||The labelPosition attribute controls the positioning of labels. The valid values for this attribute are "up", "down", "both" and "none". If the value is "up", labels will be displayed above the line, and the default value is "none".|
|yField||The yField attribute determines which field in the Data Object will be used as the Y-axis ( vertical axis ) values. In the above chart, the "Beef" and "Chicken" fields are used.|
|form||The form attribute is used to draw the different types of line in the line chart. The valid values are "segment" ( data points are connected by a straight line. ), "curve" ( data points are connected by a curved line. ), "step" ( data points are connected by a stepped line starting with the horizontal line. ) and reverseStep. The default value is "segment".|
|displayName||The displayName attribute is used to set what text will be displayed in tooltips. ( this text will be also displayed in the Legend. )|
|itemRenderer||The itemRenderer attribute determines what shape will be drawn at the data points in the line. The valid values are "DiamondItemRenderer", "CircleItemRenderer", "TriangleItemRenderer", "CrossItemRenderer", "XShapeItemRenderer", "IShapeItemRenderer", "RectangleItemRenderer".|
|showValueLabels||The showValueLabels attribute is used to display labels selectively when the labelPosition attribute is defined as "up", "down" or "both". The first index of the Data Object is "0".|
There are 4 types of lines in the line chart ( straight line, curved line, stepped line, reverse stepped line ). To specify the type of line in the line chart, use the form attribute in the <Line2DSeries> element tag, and the default value of the form attribute is "segment" ( straight line ).
<The values of the form attribute>
reverse stepped line