• Open in:

Trend Lines

You can create real analytical trendlines, indicators, and other annotations with amCharts Stock Chart but when you need something simple you can just use the core tools at your disposal in the XY Charts.

Key implementation details

To imitate trendlines we simple add extra line series with just two data points at the ends of the line.

Related tutorials

Build this chart with AI

The prompt below can be used to build this chart with AI. For best coding results, use the most advanced AI models, like Claude Opus 4.6 and GPT-5.3-Codex. For more info and tips, check out amCharts AI docs.

Create a line chart with 23 daily data points and circular bullet markers. Overlay two trend lines as separate series spanning different segments: one green (uptrend) and one red (downtrend). Include an XY cursor, tooltips, horizontal scrollbar, and X-axis zoom. Animate all series on load. Use amCharts 5 library.

Demo source