Google chart Bullet Chart
The group you are posting to is a
Usenet group . Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From:
Supafli <barkhuiz... @gmail.com>
Date: Mon, 9 Jul 2012 05:42:51 -0700 (PDT)
Local: Mon, Jul 9 2012 8:42 am
Subject: Google chart Bullet Chart
Hi,
I am trying to build a bullet chart using the google chart API.
I have managed to do the following.
function drawVisualization() {
// Create and populate the data table.
var data = google.visualization.arrayToDataTable([
['Previous', 'Current'],
['320652', 124652]
]);
// Create and draw the visualization.
new google.visualization.BarChart(document.getElementById('visualization')).
draw(data,
{title:"On Shelves",
width:180, height:80,
vAxis: {title: "",textStyle: {color: 'Black'}, textPosition:
"none",viewWindowMode:'pretty',viewWindow:{
max:320652,
min:0
},baselineColor:"#C4122F"},
chartArea:{height:25, width:150, backgroundColor:"#9DA619"},
legend:{position:"none"},
bar:{groupWidth:5},
backgroundColor: {stroke: '#000',strokeWidth: '2'},
hAxis: {title: "",textStyle: {color: 'white'},gridlines:{color:
"white"}}}
);
}
what I need to do is to display the "Previous" value on the right hand side of the chart. and also display the "Current" value next to the bar.
is this possible? Ultimately I'd like to get something similar to the attached image.
Any help will be greatly appreciated.
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Supafli <barkhuiz... @gmail.com>
Date: Wed, 11 Jul 2012 07:36:00 -0700 (PDT)
Subject: Re: Google chart Bullet Chart
I changed my code to use a stacked bar chart. all I need to do is show data labels for each data point. Is this possible?
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Supafli <barkhuiz... @gmail.com>
Date: Wed, 11 Jul 2012 07:40:52 -0700 (PDT)
Local: Wed, Jul 11 2012 10:40 am
Subject: Re: Google chart Bullet Chart
function drawVisualization() {
// Create and populate the data table.
var data = google.visualization.arrayToDataTable([
['Year', 'Copies Delivered', 'Delivered to Agents'],
['99977', 99977,231871]
]);
// Create and draw the visualization.
new google.visualization.BarChart(document.getElementById('visualization')
).
draw(data,
{title:"",
width:200, height:100,
chartArea:{width: 100, height:30,backgroundColor: {stroke: '#000',strokeWidth: '2'}},
vAxis: {title: '', textStyle:{color: 'white'}, textPosition:
'none'},
hAxis: {title: '', textStyle:{color: 'white'}},
focusTarget:'datum',
isStacked: true,
legend:{position: 'none'},
backgroundColor: {stroke: '#000',strokeWidth: '2'}
}
);
}
On Wednesday, July 11, 2012 4:36:00 PM UTC+2, Supafli wrote:
> Update:
> I changed my code to use a stacked bar chart.
> all I need to do is show data labels for each data point. Is this > possible?
You must
Sign in before you can post messages.
You do not have the permission required to post.