Skip to main content

Line Chart

Chart type for visualizing a list of Points (pair of X and Y coordinates), with a continuous stroke.

Line ChartLine Chart
import lightningchart as lc
import random

lc.set_license('my-license-key')

x_values = list(range(0, 100))
y_values = []
y = 0
for i in range(100):
y += random.random() * 2 - 1
y_values.append(y)

chart = lc.LineChart(
x=x_values,
y=y_values,
line_type='pointline',
line_color=lc.Color(0, 128, 255),
line_width=4,
point_shape='circle',
point_color=lc.Color(0, 0, 255),
point_size=6,
theme=lc.Themes.White,
title='Line Chart',
xlabel='x',
ylabel='y',
)
chart.open()