Releases: c3js/c3
Releases · c3js/c3
Introduce new architecture
- Introduced new architecture, but the interface is the same as the previous version
- Modified
data.x_format
todata.xFormat
- Modified
data.x_localtime
todata.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
- Modify unload interface - #342
- Modified to use
data.onclick
,data.onmouseover
anddata.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
todesc
- Added
onzoom
andonbrush
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
- Added
inset
forlegend.position
option - #326 - Added
pie.sort
anddonut.sort
option - #328 - Added
category
andcategories
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
- Renamed
onend
offlow
API todone
- #314 - Renamed
onenter
andonleave
toonmouseover
andonmouseout
- 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
Bug fixes
New features and bug fix
- 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 removedtoXXX
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
- 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
- Fix region.remove class logic
- Fix selected circle transition
- Fix padding left when axis rotated