Skip to content

code4fukui/c3-es

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,067 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

c3-es

日本語のREADMEはこちらです: README.ja.md

CircleCI license codecov.io jsDelivr Hits

c3-es is the ES module version of C3.js, a D3-based reusable chart library that enables deeper integration of charts into web applications. This fork provides a simple way to use C3.js in modern web projects directly from a CDN, without a build step.

Demo

View the live demo

Usage

To use c3-es, import the initC3 function from the module and call it with the window object. This helper function handles the setup of the D3.js dependency and automatically loads the required CSS file.

<div id="chart"></div>

<script type="module">
// Import the initializer from the c3-es module
import { initC3 } from "https://code4fukui.github.io/c3-es/c3-es.js";

// Initialize C3 and get the c3 object
const c3 = initC3(window);

// Generate a chart
const chart = c3.generate({
  bindto: '#chart',
  data: {
    columns: [
      ['data1', 30, 200, 100, 400, 150, 250],
      ['data2', 50, 20, 10, 40, 15, 25]
    ]
  }
});
</script>

This module is generated by make_c3-es.js from the official c3.esm.js file.

Documentation

Since c3-es is a repackaging of C3.js, you can refer to the official C3.js documentation for all charting options and API methods.

Additional samples can be found in the original C3.js repository:

You can run these samples locally by cloning the original repository and running:

$ npm run serve-static

Community & Support

  • Google Group: For general questions and discussions, please visit the C3.js Google Group.
  • Gitter: For live chat with the community, join the Gitter channel.
  • Issues: The issue queue is for reporting bugs and requesting features in the original C3.js library. It is not a general support forum.

Dependency

  • D3.js ^5.0.0 (loaded automatically via Skypack CDN)

License

MIT

About

📊 A D3-based reusable chart library

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 58.9%
  • TypeScript 32.2%
  • HTML 8.5%
  • Other 0.4%