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 4049650
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:58:17+00:00 2026-05-20T13:58:17+00:00

I need to generate a chart like this one: Specifically, I want to show

  • 0

I need to generate a chart like this one:

positve/negative chart

Specifically, I want to show both a positive value and a negative value for a time period (could be an hour, minute, etc.) and display it like this.

I could have sworn I saw something like this on the Google Visualization API Gallery the other day, but I can’t find it now, and am not even sure what this kind of chart is called.

First, do you know what this kind of chart is called so I can possibly find documentation? Second, is there any way to implement such a chart with the Google Visualization API? If not, is there another common charting solution for web that I can achieve this with?

Thank you for your time.

  • 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-05-20T13:58:18+00:00Added an answer on May 20, 2026 at 1:58 pm

    This is called a “Stacked Bar Chart”, and can indeed be created with the Google Visualisation API.

    Simply use the “isStacked” property (described here; http://code.google.com/apis/visualization/documentation/gallery/barchart.html).

    Here’s some sample code (based off the default bar chart example provided by Google and updated to show the use of isStacked and some sample data from your example);

    function drawVisualization() {
    
      var data = new google.visualization.DataTable();
      data.addColumn('string', 'Month');
      data.addColumn('number');
      data.addColumn('number');
    
      data.addRows(12);
    
      data.setCell(0, 0, 'January');
      data.setCell(1, 0, 'February');
      data.setCell(2, 0, 'March');
      data.setCell(3, 0, 'April');
      data.setCell(4, 0, 'May');
      data.setCell(5, 0, 'June');
      data.setCell(6, 0, 'July');
      data.setCell(7, 0, 'August');
      data.setCell(8, 0, 'September');
      data.setCell(9, 0, 'October');
      data.setCell(10, 0, 'November');
      data.setCell(11, 0, 'December');
    
      data.setCell(0, 1, 19);
      data.setCell(1, 1, 18);
      data.setCell(2, 1, 20);
      data.setCell(3, 1, 19);
      data.setCell(4, 1, 18);
      data.setCell(5, 1, 20);
      data.setCell(6, 1, 19);
      data.setCell(7, 1, 18);
      data.setCell(8, 1, 20);
      data.setCell(9, 1, 19);
      data.setCell(10, 1, 18);
      data.setCell(11, 1, 20);
    
      data.setCell(0, 2, -12);
      data.setCell(1, 2, -13);
      data.setCell(2, 2, -11);
      data.setCell(3, 2, -12);
      data.setCell(4, 2, -13);
      data.setCell(5, 2, -11);
      data.setCell(6, 2, -12);
      data.setCell(7, 2, -13);
      data.setCell(8, 2, -11);
      data.setCell(9, 2, -12);
      data.setCell(10, 2, -13);
      data.setCell(11, 2, -11);
      data.setCell(0, 2, -12);
      data.setCell(1, 2, -13);
      data.setCell(2, 2, -11);
    
      // Create and draw the visualization.
      new google.visualization.ColumnChart(document.getElementById('visualization')).
          draw(data,
               {title:"S&P 500 Up/Down Performance Since 1980", 
                width:600, height:400,
                isStacked:"true",
                legend:"none" }
          );
    }
    

    And the results…

    Stacked Bar Chart

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

Sidebar

Related Questions

I need to generate report that will show number of new / changed rows
I need to generate Entities/Object from selected tables - not all. Is this possible
I want to create a component which can be used like: <mc:chart data=#{bean.data} width=200
I need to generate a swim lanes chart similar to the following but with
Is it possible, if one has a javascript variable like this: var myVariable =
I generate a texture like this: GLuint id; glGenTextures(1, &id); glBindTexture(GL_TEXTURE_2D, id); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,
I have a list of audio files like this, int music_numbers[] = { R.raw.one,
I need generate action links outside controllers. I can use Html.Action in Views, Url.Action
I need to generate a couple of objects from lists in Javascript. In Python,
I need to generate such pattern for my input, for example: +375 29 911-91-91

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.