
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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
If you use the Column chart, set the
isStackedproperty 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:
Here is what it looks like: