Thank you for reporting this bug. We will make it our priority to review this report.
-
Sencha User
Column chart with 2 Y axes
Hi,
I'm trying to plot a column chart with 2 series and thus 2 Y axis, one in the left side and the other in the right side. But the columns display in the same place, on top of each others and not side by side. Do you have any idea how to fix this ?
Thanks
-
Instead of two series, try specifying yField as an array:
Code:
yField: ['data1', 'data2']
-
Sencha User
I just tried but it doesnt work neither. The problem is when I try with 2 series, I actually have 2 series drawn, but they are drawn on top of each others, so one is hiding the other.
-
I just tried that line of code in the column example of the touch charts and it worked as I would expect it. Each month had two columns next to each other.
-
Sencha User
Can you show me the full code you tried please ?
-
If you open the column example, scroll down and replace the yField with that array
-
Sencha User
Yes what you said works, but what I'm trying to do is something like that :
Code:
Ext.onReady(function () {
var chart;
chart = new Ext.chart.Chart({
width: 800,
height: 600,
animate: true,
store: store1,
renderTo: Ext.getBody(),
shadow: true,
axes: [{
type: 'Numeric',
position: 'left',
fields: ['data1'],
label: {
renderer: Ext.util.Format.numberRenderer('0,0')
},
title: 'Number of Hits',
grid: true,
minimum: 0
}, {
type: 'Category',
position: 'bottom',
fields: ['name'],
title: 'Month of the Year'
}, {
type: 'Numeric',
position: 'right',
fields: ['data2'],
title: 'Test'
}],
series: [{
type: 'column',
axis: 'left',
highlight: true,
xField: 'name',
yField: 'data1'
}, {
type: 'column',
axis: 'right',
xField: 'name',
yField: 'data2'
}]
});
});
Something with a right axis and a serie linked to this axis.
-
What you want is two columns side by side for one name correct? Using the yField as an array does just that.
-
Sencha User
Yeah but I want one of them linked to the right axis, so I can have two different scales.
-
Sencha User
Hi, Trexx
did you got the solution of the same as i m looking for the same thing