Skip to main content Skip to footer

Build Dynamic, Data-Driven Charts with the SpreadJS DataCharts Add-On

SpreadJS already includes support for standard Excel-compatible charts. This optional DataCharts add-on is designed to support creating charts that bind directly to structured application data via the SpreadJS Data Manager, rather than relying on worksheet cell ranges.

  • Bind charts directly to Data Manager tables
  • Visualize data without first placing it in worksheet cells
  • Map data fields to chart categories, values, series, and other elements
  • Build through the runtime API or Designer tools
Download Free SpreadJS Trial Online DataCharts Demos

Data-Driven Charting Beyond the Spreadsheet

SpreadJS’s DataCharts add-on provides a flexible way to create rich, data-driven visualizations inside JavaScript spreadsheet applications. Unlike standard Excel-like charts, typically tied to cell ranges, DataCharts can bind to data sources outside the workbook. Making DataCharts well-suited for externally data-driven dashboards, reporting interfaces, and applications built around structured application data. Developers can map data fields directly to chart elements, configure a variety of plot types, and customize the presentation to fit specific application requirements.

SpreadJS Charts vs. DataCharts Add-On: What’s the Difference?

SpreadJS supports creating, loading, and saving Excel-style charts - including loading charts from imported Excel files - right out of the box. These traditional charts are spreadsheet-centric and tied to worksheet data. The DataCharts add-on however uses data that is independent of the worksheet data and is designed for applications where chart data exists externally outside of the SpreadJS spreadsheet cells.

SpreadJS Built-in Charts DataCharts Optional Add-On
Best For Excel compatibility Data-driven dashboards, reporting apps, and chart web applications
Data Source Worksheet cells and ranges Data Manager tables
Binding Model Cell references Field-based mappings
Spreadsheet Dependency Tied to worksheet data Independent of worksheet grid
Data Architecture Data and visualization stored together Separation of data and presentation
Hierarchical Data Support Limited spreadsheet model Supports structured and hierarchical mappings
Styling & Configuration Traditional chart settings Advanced encodings, plots, and visual customization
ReportSheet Integration Standard chart workflows Native Data Manager/ReportSheet scenarios
Excel Export Remains an Excel-compatible chart Exported as an image

Ultimate JS Data-Driven Chart Component

Bind Charts Directly to Application Data

Bind Charts Directly to Application Data

Connect DataCharts directly to SpreadJS Data Manager tables instead of first placing source data into worksheet cells. Field-based encodings let developers map values, categories, related tables, hierarchical data, filters, colors, and other dimensions directly to chart visualizations, making DataCharts ideal for dashboards, reporting systems, and other data-driven application.

Easily Design Charts

Developers and end users can quickly design and bind DataCharts to data sources. The Data Charts Panel can be initialized at runtime within a SpreadJS application or accessed through SpreadJS' designer options, including the Designer Ribbon Component add-on, providing a visual way to configure chart data, mappings, and presentation without relying entirely on code.

Easily Design JavaScript Data-Driven Charts Using a Familiar User Interface
Build Rich Chart Types in JavaScript Web Applications

Supports a Wide Range of Data Chart Types

Build rich visualizations with a broad selection of chart types, including Column, Bar, Line, Area, Pie, Donut, Scatter, Bubble, Treemap, Funnel, Waterfall, Candlestick, OHLC, and Combo charts. This variety gives developers the flexibility to visualize everything from categorical comparisons and trends to hierarchical and financial data.

Build Your Own JavaScript Data-Driven Chart

Quick Start Guide
1. Install and Import the Required Packages - Add SpreadJS, Shapes, and the Data Charts add-on to your application.

Import needed packages:

import * as GC from "@mescius/spread-sheets";
import "@mescius/spread-sheets/styles/gc.spread.sheets.excel2013white.css";
import "@mescius/spread-sheets-shapes";
import "@mescius/spread-sheets-datacharts-addon";
2. Initialize the Workbook - Create a SpreadJS workbook and access the worksheet where the chart will appear.

Add a host element:

<div id="spreadjs-host" style="width: 100%; height: 500px;"></div>

Create the workbook and access its active worksheet:

const spread = new GC.Spread.Sheets.Workbook("spreadjs-host");
const sheet = spread.getActiveSheet();
3. Connect Data - Add your data as a Data Manager table and call fetch() to load it.
const dataManager = spread.dataManager();
const salesTable = dataManager.addTable("Sales", {
  data: [
    { product: "Laptop", sales: 1250 },
    { product: "Monitor", sales: 850 },
    { product: "Keyboard", sales: 475 }
  ]
});
await salesTable.fetch();
4. Create and Configure the Chart - Use sheet.dataCharts.add() to insert the chart, then setChartConfig() to bind table fields and customize its type, values, categories, and appearance.
const DC = GC.Spread.Sheets.DataCharts;
const chart = sheet.dataCharts.add("sales-chart", 10, 10, 600, 400, DC.DataChartType.column);
chart.setChartConfig({
  tableName: "Sales",
  config: { header: { title: "Sales by Product" } },
  plots: [{
    type: DC.DataChartType.column,
    encodings: {
      values: [{ field: "sales", aggregate: DC.Aggregate.sum }],
      category: { field: "product" }
    }
  }]
 });

Learn more with the Create Data Charts Documentation.

Easy Licensing & Distribution

After Purchasing Users Generate DataCharts Enabled SpreadJS Distribution Keys for Application/s Through Their MESCIUS Account.

Licensing & FAQs

The DataCharts add-on is enabled through a SpreadJS distribution key. SpreadJS is licensed per developer and deployed hostname, with deployment licenses varying by commercial or non-commercial use.

Learn More About Optional Add-On Licensing

Request a DataCharts Add-On Enabled Trial Key

Our sales team can provide a 30-day DataCharts enabled trial key upon request, allowing you to deploy SpreadJS and this optional add-on during your trial period.

Contact Our Sales Team

Have Questions? We're Here to Help

Email us.sales@mescius.com to schedule a call with our product specialists or request a personalized demo through support to discuss your project needs.

Contact Support

Award-Winning Products and First-Class Support

Five Star Rating

"I have been using a various form of Spread back to the COM days. Spread is the most reliable spreadsheet that retrieves and stores data, whether interacting with a database or simply an Excel file. Try it out, and you will not go back to any other control"

TRUSTED CUSTOMER

Five Star Rating

"Great support through evaluation process, Spread is my favorite development add-in, adds great, high value capabilities to applications!"

TRUSTED CUSTOMER

Five Star Rating

"Excellent Products. I have been using their products for around 15 years. Always there to help."

TRUSTED CUSTOMER

Top 50 Product (#31) - Component Source 2025 SpreadJS Top 50 Product Award - Component Source 2026 Awards

"SpreadJS enabled the core spreadsheet interface that Ramp Sheets is built around. Rather than being an additive feature, it served as the foundation for the primary user experience."

Ben Geist, Ramp Labs

"Thanks for providing the best [JavaScript] spreadsheet widget in the world, we're very happy customers. Your product has saved us a TON of time relative to other solutions we used in the past."

Jan Domanski, Labstep

"We have been using Spread in our desk and web products (PerpetualBudget) for over a decade. Not only are the Spread grids great controls but the support at GrapeCity [now known as MESCIUS] is the best. When you need them, they're there!"

Jim Spicer, Spicer-Baer Associates

"One of the nice things about SpreadJS is that we could just plug it into our frontend and get all of that functionality directly out of the box without having to develop it ourselves. Spreadsheets are complicated… and I don't want to build them myself."

Alex Henkel, Ramp Labs

"I haven't come across such a feature-rich solid Spread before. Thanks for giving such a nice component."

Adavesh Managaon, MVP, Visual C#

"Spread benefits my company because our clients can now see the immediate benefit the websites we create for them provide."

Michael Stark, Owner, StarkNetwork.com