Skip to main content

Line Chart

Line Chart (LineChart) is a chart control.

Examples​

Properties​

NameTypeDefaultDescription
legendboolfalseWhether to show legend.
tooltipsboolfalseWhether to show tooltips over bars.
strokeWidthint2Stroke width in pixels.
yMinnumberMinimum display value of Y axis.
yMaxnumberMaximum display value of Y axis.
yTicksintThe number of ticks on Y axis.
yFormatstring{y}Formatting for y axis labels. {y} in a format string is replaced with point y value.
xTypestringnumberThe data type of X axis: number (default) or date.

Child controls​

Data control​

Serves as a container for P (point) controls. Line chart control can contain multiple data controls to draw several lines on the same chart.

Properties​

NameTypeDefaultDescription
colorstringStroke color of the data set.

Child controls​

P control​

Describes chart data point.

Properties​

NameTypeDefaultDescription
xnumber or dateIndependent value of the data point, rendered along the x-axis. Date should be a string in format 'YYYY-MM-DD' or datetime odject (for Python)
ynumberDependent value of the data point, rendered along the y-axis.
ticknumber or dateTick value for the datapoint. If at least one tick value is provided all X axis labels will be replaced with ticks. Date should be a string in format 'YYYY-MM-DD' or datetime odject (for Python)
legendstringLegend text for the datapoint in the chart.
xTooltipstringCallout data for x axis. legend will be used if not provided.
yTooltipstringCallout data for y axis. y will be used if not provided.