c3js / c3js/c3

zoom y-axis under rotated : true

Open
#2,148 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
9.3k
Forks
1.4k
Avg merge
6d 16h
Merged PRs (30d)
1

Description

i make a timeline chart with stacked bar.
but, it not works very well.
1. add tasks only holizontaly.
2. it zooms only vertically.

demand some improvement. try it !
---

var chart = c3.generate({
data: {
x : 'x',
columns: [
['x', 'task1', 'task2', 'task3'],
['Starts', new Date('2010-03-01'), new Date('2009-05-15'), new Date('1995-03-21 16:00')],
['Durations', 50000000000, new Date('2010-03-01')-new Date('2009-05-15'), 15000000000 ],
],
type: 'bar',
groups: [['Starts','Durations']],
order: null,
colors: {
Starts: '#f0f0f0',
}
},
axis: {
rotated: true,
x : {
type: 'category',
},
y: {
type: 'timeseries',
tick: {
rotate: 75,
format : function(y) { var s = '%y/%m/%d'.replace( '%y', y.getFullYear()).replace( '%m', y.getMonth()+1 ).replace( '%d', y.getDate() ); return s; }
}
}
},
zoom: {
enabled: true,
rescale: true
}
});

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.