c3js/c3
46.9
Weak · 2 October 2026
65.4k
lines of production code
JavaScript
with TypeScript
2
measurements over time
What this system is
C3.js is a D3-based JavaScript charting library that generates various visualizations such as line, bar, pie, and bubble charts. It provides extensions for advanced interactions like zoom with data reduction and exporting charts to static images. The system includes a modular SCSS architecture for styling and a comprehensive suite of samples and tests to demonstrate API usage and configuration options.
How it got here
2013 — Initial release and sample expansion
6 changes.
This period marks the initial release of C3.js v0.7.20, establishing the core library structure, build environment, and dependencies on D3.js. It involved creating a comprehensive set of HTML sample pages and data files to demonstrate API usage, configuration options, and new features like Stanford charts. The documentation site was also updated with Bootstrap styling and modernized build tools.
2014 — C3.js extension and modularization
4 changes.
This period focused on extending C3.js capabilities by adding a zoom feature with data reduction, a PhantomJS-based image exporter, and RequireJS integration samples. The project also improved maintainability by splitting the monolithic C3.js CSS into modular SCSS files for better customization and reduced bundle sizes.
2015–2020 — TypeScript migration and chart extensions
4 changes.
The project migrated its core source code from JavaScript to TypeScript to improve maintainability and provide static typing for the public API. This period also saw the addition of a new bubble chart extension leveraging C3.js and D3.js, alongside a comprehensive TypeScript test suite to verify the library's functionality.
Features
Add PhantomJS-based chart exporter for C3.js
A new exporter extension has been added to generate PNG or JPEG images of C3.js charts using PhantomJS. This feature introduces a \phantom-exporter.js\ script and a \config.json\ file that loads the necessary D3 and C3 libraries, allowing users to render charts to static image files via command-line arguments.
extensions/exporter · high confidence
Add RequireJS sample and symlink for JS extensions
The distribution now includes a RequireJS sample configuration (htdocs/js/samples/requirejs.js) that loads D3 and C3 via CDN, along with a supporting plugin sample (htdocs/js/samples/plugin.js) and a zoom-reduction sample (htdocs/js/samples/zoom\_reduction.js). Additionally, htdocs/js/extensions is now a symbolic link pointing to ../../extensions/js, making the external extension scripts directly accessible from the web root.
htdocs/js · high confidence
Add bubble chart extension
A new bubble chart extension has been added to the charting library. This feature allows users to create bubble charts by specifying data pairs with x, y, and value attributes. The extension leverages the underlying C3.js and D3.js libraries to render the bubbles, with bubble sizes proportional to the specified values. An example HTML file is included to demonstrate the usage of this new chart type.
extensions/chart-bubble · high confidence
Added Bootstrap v3.0.0 CSS framework
The project now includes the minified CSS styles for Bootstrap v3.0.0 in htdocs/css/bootstrap.min.css. This adds the standard Bootstrap grid system, responsive utilities, form controls, navigation components, and icon fonts (Glyphicons) to the application's styling, enabling developers to use Bootstrap classes for layout and UI elements.
htdocs/css · high confidence
Added C3.js zoom extension with data reduction
The \extensions/js/c3ext.js\ file introduces a new extension for C3.js charts that enables zooming functionality with automatic data reduction. When enabled via the \zoom2\ option, the extension intercepts chart data to slice and aggregate points based on the current zoom level and a configurable \maxItems\ limit, ensuring performance remains stable when displaying large datasets. It also provides methods to enhance or reduce the zoom range and integrates with the chart's load and unload events to keep the reduced data in sync.
extensions/js · high confidence
Added sample data files for C3 charting library
Added a collection of sample data files in JSON, CSV, and TSV formats (including Stanford diagram data and various test datasets) to support the C3 charting library's data loading capabilities.
htdocs/data · high confidence
Initial release of C3.js v0.7.20
This change introduces the initial commit for the C3.js charting library, establishing the project structure with version 0.7.20. It adds the core distribution files (c3.js, c3.min.js, c3.esm.js, c3.css, c3.min.css) and configures the build and development environment through .editorconfig, .gitignore, .jshintrc, .prettierrc.json, and .travis.yml. The package is defined in bower.json and package.json with a dependency on D3.js ^5.0.0, and includes documentation files such as README.md, CONTRIBUTING.md, and MAINTAINANCE.md.
(repo-wide) · high confidence
New API and configuration sample pages for C3.js
Added a comprehensive set of new HTML sample files in the htdocs/samples directory demonstrating C3.js API usage and configuration options. These include examples for dynamic axis labels and ranges, categorized axes, data color updates, flow animations (including timeseries), legend visibility, tooltip control, chart type transformation, and grid line management. Additional samples cover zoom behavior, area and bar zero-based settings, log scales, axis padding, local time handling, tick culling/fitting/rotation, and various chart types like arc, area, and stacked areas.
htdocs/samples · high confidence
New samples index page with Stanford chart support
The htdocs/index.html file has been added to serve as a central navigation hub for the library's sample gallery. This page organizes available examples by category, including Line, Area, Bar, Pie, Donut, Gauge, Scatter, and Combination charts, as well as detailed sections for Axes configuration. Notably, it introduces a new 'Stanford Chart' section, linking to samples for standard and custom Stanford diagrams, reflecting the addition of Stanford Diagrams support in the library.
htdocs · high confidence
Behavioural changes
1 commit (0 fixes) modifying design
A change to existing behaviour in design — 1 commit, 1 file.
design · low confidence · unverified
Chart library migrated to TypeScript
The core source files in the \src\ directory have been converted from JavaScript to TypeScript. This migration introduces static typing to the public API (including methods for axes, data, zoom, and selection) and internal chart logic, which improves code maintainability and provides better type definitions for consumers of the library.
src · high confidence
Splits C3.js CSS into modular SCSS files
The single c3.css file has been split into multiple SCSS modules (arc, area, axis, bar, brush, chart, focus, grid, legend, line, point, region, select\_drag, text, title, tooltip, zoom) and reassembled via a main.scss entry point. This modularization allows users to import only the specific chart components they need, reducing unused CSS and making it easier to customize individual visual elements like tooltips, arcs, or zoom interactions without affecting the entire chart style.
src/scss · high confidence
Test coverage
Added TypeScript test suite for C3 chart APIs
Added a comprehensive set of TypeScript test specifications covering the C3 charting library's public API and core behaviors. The new tests in the spec directory verify functionality for axis configuration (labels, types, ranges), data manipulation (loading, naming, coloring, axes mapping), chart interactions (focus/defocus, zoom/unzoom), visual elements (donut/pie padAngle, regions, grids), and internal utilities (caching, class generation, initialization).
spec · high confidence
Dependencies
Upgrade documentation site to Middleman 4.6 and update build toolchain
The documentation site has been upgraded to Middleman 4.6, requiring Ruby dependencies defined in the new Gemfile and Gemfile.lock. The JavaScript build toolchain has been updated to use Rollup 2.79.2, Babel 7.29.7, and Sass (dart-sass) instead of the previous Grunt-based setup, with corresponding updates to devDependencies in package.json and the yarn.lock file.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 46 → 47 (+0.5)
- Rubric changed (rubric-2026.09.12 → rubric-2026.09.18) — scores are not directly comparable.
Lenses
- Code Health 40 → 40 (+0.7)
- Architecture 98 → 99 (+0.3)
- Maturity 51 → 51 (+0.0)
- Readiness 53 → 53 (+0.7)
- Security 65 → 69 (+3.4)
- Accessibility 46 → 46 (+0.0)
Resolved (31)
- Documentation: no contributor guidance (README.md)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- High CVE: [GHSA redacted] (yarn.lock)
- ZoomBehavior (cyclomatic 22) (extensions/js/c3ext.js)
- convertDataToTargets (cyclomatic 31) (c3.esm.js)
- drag (cyclomatic 16) (c3.esm.js)
- flow (cyclomatic 28) (c3.esm.js)
- generate (cyclomatic 16) (extensions/js/c3ext.js)
- generateFlow (cognitive 32) (c3.esm.js)
- generateFlow (cyclomatic 25) (c3.esm.js)
- getHorizontalAxisHeight (cyclomatic 20) (c3.esm.js)
- getShapeOffset (cognitive 21) (c3.esm.js)
- getTooltipContent (cyclomatic 20) (c3.esm.js)
- getTooltipSortFunction (cyclomatic 16) (c3.esm.js)
- getYDomain (cyclomatic 45) (c3.esm.js)
- initWithData (cognitive 27) (c3.esm.js)
- initWithData (cyclomatic 25) (c3.esm.js)
- lineWithRegions (cyclomatic 20) (c3.esm.js)
- load (cognitive 16) (c3.esm.js)
- …and 11 more
New (197)
- FileTooLong: js/c3.js (docs/js/c3.js)
- FileTooLong: src/arc.ts (src/arc.ts)
- FileTooLong: src/core.ts (src/core.ts)
- High CVE: [GHSA redacted] (yarn.lock)
- Medium: security finding (details withheld)
- Medium: security finding (details withheld)
- Medium: security finding (details withheld)
- api.flow.Chart.flow (cognitive 52) (src/api.flow.ts)
- api.flow.Chart.flow (cyclomatic 28) (src/api.flow.ts)
- api.flow.ChartInternal.generateFlow (cognitive 33) (src/api.flow.ts)
- api.flow.ChartInternal.generateFlow (cyclomatic 25) (src/api.flow.ts)
- arc.ChartInternal.redrawArc (cognitive 57) (src/arc.ts)
- arc.ChartInternal.redrawArc (cyclomatic 44) (src/arc.ts)
- arc.ChartInternal.transformForArcLabel (cyclomatic 17) (src/arc.ts)
- c3.Chart.flow (cognitive 52) (c3.js)
- c3.Chart.flow (cognitive 52) (docs/js/c3.js)
- c3.Chart.flow (cyclomatic 28) (c3.js)
- c3.Chart.flow (cyclomatic 28) (docs/js/c3.js)
- c3.ChartInternal.convertDataToTargets (cognitive 24) (c3.js)
- c3.ChartInternal.convertDataToTargets (cognitive 24) (docs/js/c3.js)
- …and 177 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
c3js/c3 was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 2 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 245905b2ffaf1ce68f1f6ce701277ab83d92bec6 — the exact code this score is about.
- Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.