Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zoom y-axis under rotated : true #2148

Open
Ham06 opened this issue Aug 20, 2017 · 0 comments
Open

zoom y-axis under rotated : true #2148

Ham06 opened this issue Aug 20, 2017 · 0 comments

Comments

@Ham06
Copy link

Ham06 commented Aug 20, 2017

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
}
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant