I have a bar plot with inverted X/Y Axes. Here is my code and output:
var myData = {};
myData.x = 'x';
myData.xFormat = "%Y-%m-%d";
myData.type = 'bar';
myX = app.reportsCollection.countedByDay.plotData.X;
myY = app.reportsCollection.countedByDay.plotData.Y;
myX.splice(0,0,'x');
myY.splice(0,0,'Nuevos Reportes');
myData.columns = [];
myData.columns.push(myX);
//http://stackoverflow.com/a/586189/1862909
myData.columns.push(myY);
var chart = c3.generate({
bindto: elementID,
data: myData,
size: {
height: 300
},
bar: {
width: {
ratio: 0.5 // this makes bar width 50% of length between ticks
}
// or
//width: 100 // this makes bar width 100px
},
axis: {
x: {
type: 'timeseries',
tick: {
format: "%b-%d"
}
},
},
legend: {
show: false
}
});
What I need is to link to specific pages on the X tick labels. In the example, Otra
should be a hyperlink.
I tried to include the link as text in the myX
variable, but it didn't work.
Any idea how to do this?