A line chart connects data points with straight segments, making it one of the most effective ways to display trends over time. AnyChart’s JavaScript line chart supports multiple series, interactive features, and full visual customization.
This sample plots four series representing U.S. age groups (18–34, 35–49, 50–64, and 65+) to show how acceptance of same-sex relationships changed from 1990 to 2018. Each series has a custom stroke color, and tooltips are formatted to display the age group name and percentage value. A crosshair and legend are enabled for interactive exploration, and chart animation brings the data to life on load.
Follow the step-by-step Line Chart Tutorial to learn how this chart was built. See the Line Chart documentation for all configuration options.