Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9009837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:18:14+00:00 2026-06-16T02:18:14+00:00

I can draw a side-by-side style column chart, and a stacked chart (all above

  • 0

enter image description here

I can draw a side-by-side style column chart, and a stacked chart (all above x-axis), but not this one. How to make the value below x-axis still positive?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T02:18:15+00:00Added an answer on June 16, 2026 at 2:18 am

    If you use the Column chart, set the isStacked property to true and multiply one gender’s value (female in your example) by -1 this will give you the bars you are looking for. next you need to alter the vAxis format to hide the negative symbol. There are some limitations to Google Charts that will make 100% of this request harder to achieve. The biggest one is that Google Charts only supports part of the ICU pattern set, and that means you can’t add the percent modifier to both the positive and negative values. To address this I’ve multiplied the percent value by 100 instead of fractions of 1.0 which would be technically correct. Also as you have pointed out the tooltips show negative values. to address this you need to give a formatted value for the Female datums that is the positive value (maybe you can include the % in that case, because it’s just a string and isn’t the charted value).

    In the Google Code Playground try this:

    function drawVisualization() {
      /* Create and populate the data table. */
      var data = {
        "cols":[
          {"id":"Age","label":"Age","type":"string"},
          {"id":"Female","label":"Female","type":"number"},
          {"id":"Male","label":"Male","type":"number"}
        ],"rows":[
          {
            "c":[
              {"v":13,"f":"13-17"},
              {"v":-11,"f":"11%"},
              {"v":2,"f":"2%"}]
          },
          {
            "c":[
              {"v":18,"f":"18-24"},
              {"v":-8,"f":"8%"},
              {"v":5,"f":"5%"}]
          },
          {
            "c":[
              {"v":25,"f":"25-34"},
              {"v":-6,"f":"6%"},
              {"v":8,"f":"8%"}]
          },
          {
            "c":[
              {"v":35,"f":"35-44"},
              {"v":-6,"f":"6%"},
              {"v":10,"f":"10%"}]
          },
          {
            "c":[
              {"v":45,"f":"45-54"},
              {"v":-8,"f":"8%"},
              {"v":12,"f":"12%"}]
          },
          {
            "c":[
              {"v":55,"f":"55-64"},
              {"v":-3,"f":"3%"},
              {"v":7,"f":"7%"}]
          },
          {
            "c":[
              {"v":64,"f":"64+"},
              {"v":-1,"f":"1%"},
              {"v":2,"f":"2%"}]
          }
        ]
      };
    
      /* Create and draw the visualization. */
      new google.visualization.ColumnChart(document.getElementById('visualization'))
        .draw(new google.visualization.DataTable(data), {
          title:"Coffee Consumption by age",
          isStacked: true,
          vAxis: {
            format: "##;##"
          },
          width:600, height:400,
          hAxis: {
            title: "Age"
          }
        }
      );
    }
    

    Here is what it looks like:

    Stacked Chart

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can draw many things using this : NSString *imagePath = [[NSBundle mainBundle] pathForResource:@dummy2.png
i can draw a string/image... with drawInRect/drawAtPoint. but how about if i want to
I have an area where the user can draw using a finger. This area
I'm trying to draw 2 Quad_Strips on top of each other, but I can't
I need to draw something like this using html and css. I am not
I am trying to draw a rectangle with 4 lines (left one). But no
I was looking for a solution but all are how to draw polylines from
I can draw a circle around a given point (x,y) with a command like
How i can draw hand free graphic objects in windows 8, like paint can.
In Visual studio I can draw 13 different application-icons in different resolutions and color

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.