Skip to content

Releases: c3js/c3

Introduce new architecture

22 Aug 15:31
Compare
Choose a tag to compare
  • Introduced new architecture, but the interface is the same as the previous version
  • Modified data.x_format to data.xFormat
  • Modified data.x_localtime to data.xLocaltime

The idea of this architecture is suggested by @lblb and @yuvii . I appreciate your contribution. And please see this PR #486 for the detail of the new architecture.

Please let me explain what the new architecture enables.

From this version, it's possible to extend c3 by using c3.chart.fn and c3.chart.internal.fn like this:

// same interface with the current version
var chart = c3.generate({ ... });
chart.focus(...);

// introduce internal API so that we can access internal variables and functions
chart.internal;
chart.internal.isTimeseries(); // isTimeseries is an internal function, but now we can access

// you can define custom API through c3.chart.fn
c3.chart.fn.myApi = function(){
   // isTimeseries is an internal variable, but now we can access in API definition
   this.internal.isTimeseries(); 
};
chart.myApi() // now we can call this

// you can change the behavior of internal functions through c3.chart.internal.fn
c3.chart.internal.fn.drawLine = function() {
   if (this.isTimeseries()) {
     // do something
   } else {
     // do something
   }
};

// you can define your own option through c3.chart.internal.fn.additionalConfig
c3.chart.internal.fn.additionalConfig = {
    myOption: undefined; // default value
};
// then, you can use this option
chart = c3.generate({
    myOption: true
});
c3.chart.fn.myApi = function () {
  console.log(this.internal.config.myOption);
};
chart.myApi(); // true

There are some remaining tasks such as adding unit tests, custom build and etc. We'll keep developing these for next version together with issues reported.

New features and bug fixes

09 Aug 05:55
Compare
Choose a tag to compare
  • Modify unload interface - #342
  • Modified to use data.onclick, data.onmouseover and data.onmouseout on pie/donut/gauge instead of its callbacks - #369
  • Modified to apply data.order to donut/pie chart
  • Modified the default of data.order to desc
  • Added onzoom and onbrush callbacks - #395
  • Added donut.width option
  • Added bar.width.max - #174
  • Added axis.x/y/y2.tick.outer option - #441
  • Supported json and rows on flow api - #424
  • Supported dynamic tick values - #473
  • Fixed mouse event bug on multiple xs - #453
  • Fixed grid height when padding.top specified - #368
  • Fixed tooltip position on the top of the chart - #480
  • Fixed area chart when data is null - #475
  • Fixed z-index of grids - #373
  • Fixed load API with JSON - #379
  • Fixed cursor style for zoom rect

Thank you very much for all of your contributions!

New features and bug fixes

16 Jun 00:28
Compare
Choose a tag to compare
  • Added inset for legend.position option - #326
  • Added pie.sort and donut.sort option - #328
  • Added category and categories API - #327
  • Added bar.zerobased option - #333
  • Added area.zerobased option - #360
  • Modified to use chart object as this in event handlers - #327
  • Modified option for focus grid line - #307
  • Fixed regions and date handling - #343
  • Fixed bug for y domain - #317
  • Fixed bug for unsorted timeseries data - #322
  • Fixed bug for timeseries data input - #311
  • Fixed stacking line with 0 value - #316
  • Fixed loading json with undefined data - #325
  • Fixed y domain padding when label shown - #317
  • Fixed bar chart bars moving on color update - #329
  • Fixed to update left padding automatically - #295
  • Fixed legend position when element appended - #334
  • Fixed zoom and redraw on category axis
  • Fixed initial drawing - #309 #336
  • Fixed data.colors API to be able to access default colors - #341
  • Fixed load API to accept unload without input - #342
  • Fixed to accept 0 of padding option - #361

Modify callbacks and bug fixes

04 Jun 01:51
Compare
Choose a tag to compare
  • Renamed onend of flow API to done - #314
  • Renamed onenter and onleave to onmouseover and onmouseout
  • Added extension for zoom with reduction - #271 #310 by @danelkhen Thank you!!
  • Fixed bug for data.label not shown - #295
  • Fixed bug for scrolling on the chart - #312
  • Fixed bug for loading Date as number - #311
  • Fixed bug for flow API with non timeseries data
  • Fixed bug for tick width when no data
  • Fixed bug label on gauge chart when value is 0

New features and bug fixes

03 Jun 04:43
Compare
Choose a tag to compare
  • Added zoom.enable API - #304
  • Added tooltip.grouped option - #307 - Fixed bug for padding when data label shown - #295
  • Modified ygrids.remove and xgrids.remove to accept multiple args
  • Fixed bug in flow API
  • Fixed class for grid.y.lines

Bug fixes

01 Jun 23:44
Compare
Choose a tag to compare
  • Changed the min of y to 0 when area chart
  • Fixed xgrids.remove and ygrids.remove APIs
  • Fixed y domain padding for data label when data.label = true - #295
  • Fixed y domain padding - #296
  • Fixed bug on category axis when legend.show and legend.hide called - #286

New features and bug fix

30 May 14:21
Compare
Choose a tag to compare
  • Supported step chart - #254
  • Supported gauge chart - #254
  • Supported stacked line/spline/area chart - #254
  • Supported JSON as input - #236
  • Supported y axis padding as ratio - #251
  • Supported text when no data
  • Supported formatting target's name on tooltip - #282
  • Added flow API - #207
  • Added transform API and removed toXXX APIs
  • Added color API - #263
  • Fixed bug for x axis as timeseries without data.x_format - #268
  • Fixed axis.min/max/range for timeseries - #285
  • Fixed domain update on loading categorized data #255
  • Fixed using numeric values as category names. #267

Thank you so much for every feedback and contribution from every developer and user, and especially I appreciate @bjlbernal 's work on step/gauge/stacked line/splie/area chart. Thank you very much!

New features and bug fix

18 May 12:49
Compare
Choose a tag to compare
  • Enable to get element without bindto #208
  • Fix to remove class 'c3' when destroy() called #233
  • Fix error when mouse over with data.names #197
  • Fix line with null on sub chart #229
  • Fix tooltip position on the edge - #234
  • Fix event rect for timeseries - #225
  • Fix check type for pie/donut - #227
  • Fix data label position on arc when the chart is small
  • Fix y padding when formatted #231
  • Fix event rect when width < 1
  • Fix update of legend when svg hidden #241

Bug fix

14 May 04:10
Compare
Choose a tag to compare
  • Fix region.remove class logic
  • Fix selected circle transition
  • Fix padding left when axis rotated

Support exports

14 May 04:09
Compare
Choose a tag to compare