Intraday Chart with Breaks (Multiple Days)
Visualize multi-day intraday data with automatic session breaks, compressing non-trading hours for clearer trend analysis. Built for financial and market data visualization.
Line Chart Types/Time Series/Intraday Chart with Breaks
Visualize multi-day intraday data with automatic session breaks, compressing non-trading hours for clearer trend analysis. Built for financial and market data visualization.
Intraday charts with breaks visualize time-series data spanning multiple days while intelligently handling scheduled gaps such as overnight periods and weekends. This chart type is essential for financial data, displaying stock prices or trading volumes during market hours only (e.g., 09:30-16:00). By compressing non-trading periods into minimal visual breaks, the chart focuses attention on actual trading activity and makes multi-day trends easier to analyze. The x-axis automatically adds date labels at break points to maintain temporal context.
datetime,value
2024-04-09 09:30:00,1669.00
2024-04-09 09:31:00,1668.85
2024-04-09 09:32:00,1669.23
2024-04-09 15:58:00,1640.50
2024-04-09 15:59:00,1639.80
2024-04-09 16:00:00,1640.20
2024-04-10 09:30:00,1595.40
2024-04-10 09:31:00,1597.20
2024-04-10 09:32:00,1596.85
2024-04-10 15:58:00,1700.15
2024-04-10 15:59:00,1699.50
2024-04-10 16:00:00,1700.80
2024-04-11 09:30:00,1740.20
2024-04-11 09:31:00,1741.50
2024-04-11 15:59:00,1760.30
2024-04-11 16:00:00,1760.80
2024-04-12 09:30:00,1775.50
2024-04-12 09:31:00,1778.20
2024-04-12 15:58:00,2095.40
2024-04-12 15:59:00,2098.20
2024-04-12 16:00:00,2100.50
Note: The xAxisBreaks array defines time ranges to compress on the x-axis. Each break specifies:
start: Session close time as Unix timestamp in milliseconds (e.g., 1712678400000 = 2024-04-09 16:00:00 UTC)end: Next session open time as Unix timestamp (e.g., 1712741400000 = 2024-04-10 09:30:00 UTC)gap: Visual width as percentage (typically "1%")In practice, breaks are usually generated programmatically based on your session hours (09:30-16:00 UTC) and date range. The timestamps above represent:
Should I connect lines across session breaks? Generally no. Session breaks represent real discontinuities where trading has stopped. The chart should visually break the line to make this clear. Connecting across breaks would falsely imply continuous activity and could be misleading for analysis.
How to handle different time zones? Convert all timestamps to a consistent timezone (typically UTC or the market's local time) before plotting. Document the timezone clearly in the chart subtitle or description to avoid confusion.
What about partial sessions (holidays, early closures)? Generate breaks dynamically based on actual session times. For special dates like early closures on holidays, adjust the session end time accordingly in your data preparation.
How to show overnight changes? While the chart compresses overnight periods visually, you can add annotations or tooltips that show the gap between previous close and current open. Consider adding indicators at break points showing the percentage change across the gap.
Should I show weekends? For financial charts, generally compress weekends into breaks just like overnight periods. This keeps the focus on trading activity and makes the timeline more compact and easier to read.
How many days can I show effectively? With minute-level data, 4-7 trading days works well before the chart becomes too dense. For longer periods (weeks or months), aggregate to 5-15 minute intervals. Provide zoom controls to let users explore specific days while maintaining multi-day context.
Can I have multiple sessions per day? Yes, you can define multiple trading sessions per day. For example, some stock markets have a lunch break (12:00-13:00), or you might show pre-market, regular hours, and after-hours as separate sessions with breaks between them.