XY Chart with Date-Based Axis
In addition to category and value axes, XYChart supports date axes. This enables various date-specific formatting and layout scenarios.
Implementation details
We add a new DateAxis to the chart’s xAxes. We also specify dateFormat in the series data processor to configure how the dates are formatted in our data.
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 an XY scatter plot with a date-based X-axis spanning January 1-12, 2015 and a numeric Y-axis. Display two series: one with circle markers and one with four-pointed star markers, both with variable sizes based on a value field so that larger values produce larger markers. Use 12 data points with date, two Y values, and two magnitude values for sizing. Enable mouse wheel zoom, a crosshair cursor snapping to both series, and horizontal/vertical scrollbars. Tooltips show date, y value, and magnitude. Animate on load. Use amCharts 5 library.
Demo source