Data Handling and Formats
Highcharts provides flexible data handling capabilities, supporting multiple input formats and external data sources. Understanding these options helps you efficiently integrate data into your visualizations.Data Input Methods
- Direct Data
- Data Module
- AJAX/Fetch
- Live Data
The simplest method is to pass data directly in the series configuration:Multiple formats supported:
Data Formats
Highcharts accepts data in various formats depending on your needs:Simple Array Format
Best for basic line, column, and bar charts:Coordinate Array Format
For scatter plots or custom X values:Object Array Format
For full control over point properties:CSV Data Module
The Data module provides powerful CSV parsing capabilities:Data Options Reference
string
A comma-delimited string to be parsed. Related options are
startRow, endRow, startColumn, and endColumn.string | HTMLElement
A HTML table or the ID of such to be parsed. Related options are
startRow, endRow, startColumn, and endColumn.string
The key for a Google Spreadsheet to load. See the module page for instructions.
number
default:0
The Google Spreadsheet worksheet to use, starting with 0.
boolean
default:true
Use the first row of the data as series names.
boolean
default:false
Whether to transpose the data by switching rows and columns.
function
A callback function to parse string representations of dates into JavaScript timestamps.
Dynamic Data Updates
Update chart data after initialization:- Update Series Data
- Add Points
- Update Points
- Remove Points
Real-World Examples
Data Transformation
Transform data before visualization:Performance Optimization
For datasets with more than 1,000 points, consider using the Boost module for improved rendering performance.
Best Practices
- Data Validation - Always validate external data before passing to Highcharts
- Error Handling - Implement proper error handling for AJAX/fetch requests
- Batch Updates - Disable redraw during multiple updates, then redraw once
- Memory Management - Remove old points when streaming data to prevent memory issues
- Data Caching - Cache API responses to reduce server load
Next Steps
Series Configuration
Learn about series types and options
Options
Explore global configuration options
Chart Types
See all available chart types
Examples
Browse data handling examples