Issue 1855 in google-visualization-api-issues: Bug: chartArea doesn't work as documented

0 views
Skip to first unread message

google-visualiz...@googlecode.com

unread,
Feb 6, 2015, 3:02:22 AM2/6/15
to google-visualiz...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1855 by pinus.z...@gmail.com: Bug: chartArea doesn't work as
documented
https://code.google.com/p/google-visualization-api-issues/issues/detail?id=1855

What steps will reproduce the problem? Please provide a link to a
demonstration page if at all possible, or attach code.

Tho old BarChart uses the charArea to layout the chart components, the new
bar component doesn't do that. They share the same documentation but behave
totally different.

<div id="chart_div"></div>


google.load('visualization', '1.1', {
'packages': ['bar']
});
google.setOnLoadCallback(drawStuff);

function drawStuff() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Topping');
data.addColumn('number', 'Nescafe Instant');
data.addColumn('number', 'Folgers Instant');
data.addColumn('number', 'Nescafe Beans');
data.addColumn('number', 'FolgchartAreaers Beans');
data.addRows([
['2001', 321, 621, 816, 319],
['2002', 163, 231, 539, 594],
['2003', 125, 819, 123, 578],
['2004', 197, 536, 613, 298]
]);

// Set chart options
var options = {
isStacked: true,
width: 800,
height: 600,

chartArea: {
left: '7%', // leave 7% for hAxis text
top: '5px',
width: '93%', // use the rest for the chart
height: '80%'
},

chart: {
title: 'Year-by-year coffee consumption',
subtitle: 'This data is not real'
},
vAxis: {
viewWindow: {
min: 0,
max: 1000
}
},
series: {
2: {
targetAxisIndex: 1
},
3: {
targetAxisIndex: 1
}
}
};

// Instantiate and draw our chart, passing in some options.
var chart = new google.charts.Bar(document.getElementById('chart_div'));
chart.draw(data, google.charts.Bar.convertOptions(options));
};


What component is this issue related to (PieChart, LineChart, DataTable,
Query, etc)?
google.charts.Bar

Are you using the test environment (version 1.1)?
yes


What operating system and browser are you using?
Ubuntu 14.04


*********************************************************
For developers viewing this issue: please click the 'star' icon to be
notified of future changes, and to let us know how many of you are
interested in seeing it resolved.
*********************************************************


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

google-visualiz...@googlecode.com

unread,
Apr 18, 2015, 8:37:30 AM4/18/15
to google-visualiz...@googlegroups.com

Comment #1 on issue 1855 by harsha00...@gmail.com: Bug: chartArea doesn't
Yeah.. I've noticed it as well... Seems like there is a serious issue here.

google-visualiz...@googlecode.com

unread,
May 1, 2015, 10:47:28 AM5/1/15
to google-visualiz...@googlegroups.com
Updates:
Status: Accepted
Owner: gra...@google.com
Labels: -Type-Defect Type-Enhancement

Comment #2 on issue 1855 by gra...@google.com: Bug: chartArea doesn't work
as documented
https://code.google.com/p/google-visualization-api-issues/issues/detail?id=1855

We are still in the process of implementing a lot of the features for
Material Charts. With the Material Charts, we changed the way that the
chart layout is done, which makes specifying the chart area like this
somewhat difficult.

Marking this as an Enhancement. While we ideally want to be able to have
Material Charts support all the options that CoreCharts did, it may be a
while until we get to it.
Reply all
Reply to author
Forward
0 new messages