Google Chart with Proportional Y-Axis -
i trying y-axis of stacked google column chart proportional. have tweaked settings , not able work. if max column value 1, there should 1 horizontal grid line. there should not 3 value of 1. doesn't make sense.
here chart options:
var options = { colors: ['#ba1f1f', '#306b34', '#255f85', '#e28413', '#f24333'], bar: { groupwidth: "90%" }, chartarea: { left: 50, top: 10, width: '100%', height: '75%' }, legend: { position: 'bottom' }, animation: { startup: true, duration: 250, easing: 'linear' }, isstacked: true, haxis: { slantedtext: true }, vaxis: { format: '#' }, height: 350 };
and here picture of problem:
does have suggestions on how fix this? thanks!
update @whitehat's suggestions:
i tried suggestion. didn't work. here result if set explicitly , not based on column range max.
the total count 8 column 7. 7 4 , 6 1. have other data manipulation count total number per column in stacked column chart , find max not explicitly set gridlines count. after can working correctly.
you can add following option when max column value 1
vaxis: { gridlines: { count: 2 //<-- default 5 } },
or add decimals format : '#,##0.00'
avoid repeating 1
you can use data table method check max column value
data.getcolumnrange(columnindex).max
Comments
Post a Comment