Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Google chart Bullet Chart
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
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:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Supafli  
View profile   Translate to Translated (View Original)
 More options Jul 9 2012, 8:42 am
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.

  Capture.PNG
1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Supafli  
View profile   Translate to Translated (View Original)
 More options Jul 11 2012, 10:36 am
From: Supafli <barkhuiz...@gmail.com>
Date: Wed, 11 Jul 2012 07:36:00 -0700 (PDT)
Subject: Re: Google chart Bullet Chart

> 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.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Supafli  
View profile   Translate to Translated (View Original)
 More options Jul 11 2012, 10:40 am
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'}

           }
      );

}



 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »