
Agentic Chart Extraction
Unlocking Visual Data: Introducing Agentic Chart Extraction#
At Tensorlake, we're excited to announce a powerful new capability in our document parsing pipeline: Agentic Chart Extraction.
Agentic Chart Extraction uses an agentic approach to transform static images into dynamic, usable data, unlocking a new layer of value from your documents. Whether you are processing financial reports, scientific papers, or business presentations, you can now access the data behind the visuals.
In the example below, on the left side we find a scatter plot with a larger of points and to the right, the plotting of this data after being processed by our Agentic Chart Extraction. This is challenging since there is a large number of uncorrelated points. We show that our system can generate a structured output that matches the original chart and that we can use this output to replot the chart.
Key Capabilities#
- Chart type detection: High accuracy across common chart types (line, bar, scatter, pie).
- Data series extraction: Returns structured series (category/value pairs, coordinates where available) ready for plotting or analytics.
- Robustness: Handles multi-series charts, varying axis scales, and dense point clouds; retains good fidelity even on 50+ point series.
- Deliverables: JSON outputs per-chart, evaluation reports, and plottable visualizations.
Supported Output Schemas
- We support four standardized JSON schemas used for extraction:
- Pie chart: slice-centric schema with
label,valueand optionalpercentage,colors, and display flags (good for donut/pie summarization use-cases). - Bar chart: supports
vertical/horizontal, namedseriesfor grouped/stacked bars,x_axis.categories, optional axis bounds/formatting, and per-bar display flags — ideal for categorical comparisons and time-binned revenue/metrics. - Line chart: x/y axis definitions, explicit
valuesfor x-axis (numeric or categorical), multipleserieswith styling (color,line_style,marker), and plotting hints (legend_position,grid) — suited for trends and dense time-series. - Scatter plot: per-series
x_data/y_dataarrays, marker styling (size,alpha,edge_color) and axis bounds — used for point-wise analyses and correlation extraction.
- Pie chart: slice-centric schema with
Schema-Driven Outputs — Directly Plottable
- All extracted predictions conform to the predefined JSON schemas (pie/bar/line/scatter). That means:
- Consistent ingestion: you can build a single parser that consumes every chart JSON produced by our system — no per-chart ad-hoc parsing required.
- Direct re-plotting: each JSON contains numeric arrays plus rendering hints (axis labels, series names, colors, markers). The JSON can be fed directly into plotting code or BI tools to regenerate visuals.
Availability#
Chart extraction is currently available in all OCR models. As shown in the example below, charts are extracted and structured in a consistent JSON format.
Additional Examples#
Bar Chart Example#
Original
Plotted Prediction
Predicted JSON
Scatter Plot Example#
Original
Plotted Prediction
Predicted JSON
Linear Chart Example#
Original
Plotted Prediction
Predicted JSON
SDK Usage#
Install or update to the latest version of tensorlake.
1pip install --upgrade tensorlakeYou can enable chart extraction in your parse request by selecting as an enrichment option.
1from tensorlake.documentai import DocumentAI
2from tensorlake.documentai.models.options import (
3 EnrichmentOptions,
4)
5
6enrichment_options = EnrichmentOptions(
7 chart_extraction=True,
8)
9
10doc_ai = DocumentAI(api_key=API_KEY)
11
12parse_id = doc_ai.read(
13 file_id="file_XXX", # Replace with your file ID or URL
14 enrichment_options=enrichment_options,
15)API Usage#
You can enable chart extraction in your parse request by selecting as an enrichment option.
1// POST /api/v2/parse
2{
3 "enrichment_options": {
4 "chart_extraction": true,
5 }
6}
Dr Antonio Jose Jimeno Yepes
Principal Data Scientist at Tensorlake
Principal Data Scientist at Tensorlake specialized in AI, document understanding, and data-driven systems. He focuses on building practical machine learning solutions that bridge research and real-world applications.
