Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This file only includes the Chart constructor.

  • Declares Chart constructor.
  • Does magical this bindings. This is a bad part of c3.js.
    • This makes the source code hard to read.
    • There is no benefit to do this.


This file includes central mechanism of drawing of charts.

  • Creates c3 object

  • internal.beforeInit

    • The hook called before init method
  • internal.afterInit

    • The hook called after init method
    • See this for the example usages of beforeInit and afterInit
  • internal.initChartElements

    • This function calls 5 methods initBar, initLine, initArc, initGauge, and initText
    • I think the if statement for each method is very strange because they never become false.


This files includes the methods about calculation of chart sizes.

  • internal.getParentRectValue(key: string)
    • look up the key from the parent's bounding DOMRect.
    • If the value of the given key doesn't exist on the parent, it look for the parent's parents, recursively.
    • This function includes special support of some old IE. This is probably now unnecessary.


  • Now this is top priority (Feb 2019)
  • Need to reproduce the issue on the local env first
  • -> This doesn't happen in htdocs/samples/resize.html



You can’t perform that action at this time.