Skip to main content

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

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:

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

  1. Data Validation - Always validate external data before passing to Highcharts
  2. Error Handling - Implement proper error handling for AJAX/fetch requests
  3. Batch Updates - Disable redraw during multiple updates, then redraw once
  4. Memory Management - Remove old points when streaming data to prevent memory issues
  5. Data Caching - Cache API responses to reduce server load
When using the Data module with CSV, ensure your data is properly formatted. Malformed CSV can cause parsing errors or incorrect visualizations.

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