# Interactive plot A VCL window with one `TAtlasPlot` and a row of buttons that rebuild it as four different charts. The form is created in code (`CreateNew`); there is no `.dfm`. ## What it demonstrates - Series kinds: area, line, step, point and pie (donut) - `Stacking := psStacked` for areas - A date/time argument axis with `AddNull` gaps, `AddMovingAverage` and `AddTrendLine` - Logarithmic axes on both sides (log-log) - `DonutPercent`, `Marks := pmPercent` and a per-point colour - Zoom by dragging, pan by right-dragging, wheel zoom (`TabStop` so a click focuses the chart), double-click reset, `OnZoom` - `OnPointClick` for exact hits; `OnClick` with `ValuesToPixel` to find the nearest point along the argument axis; `OnMouseMove` with `PixelToValues` and `HitTest` for a live read-out - Resetting every axis and layout property inside `BeginUpdate` / `EndUpdate` ## Build and run Open `InteractivePlot.dpr` in Delphi 13; the IDE creates the project file. Add the Atlas Plot `src` folder to the project's search path, then build and run for Win32 or Win64. No packages need to be installed. ## Expected result The window opens on the stacked area chart. Each button replaces the chart. Moving the mouse over the plot shows the cursor position in data units and, when the cursor is over a vertex, point or slice, the series title and point index. Dragging a rectangle zooms in; the status line says so; double-clicking returns to the full range. Clicking anywhere reports the nearest point along the argument axis; clicking on a point reports that point. ## Adapting it Copy one of the `Build...` procedures, give it a button with the next `Tag` and add it to the `case` in `ShowChart`. `ShowChart` calls `Reset` first because axis and layout settings persist on the control; the order inside `Reset` matters, since a date/time axis cannot be logarithmic. `Clear` also ends any zoom, as does changing `Stacking`.