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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:14:40+00:00 2026-06-17T08:14:40+00:00

I have a histogram that i want to render with ColumnCharts , I followed

  • 0

I have a histogram that i want to render with ColumnCharts, I followed the tutorial and did it and got this as an result:

enter image description here

Note the spacing at the either end of the graph (particularly the left side as the right side have some columns that’s very small)

I tried to use viewWindow but it seems to have no particular effect. Here’s the code (coffeescript) that’s used to draw it. The data has been snipped to save space as they are fairly big

    data = google.visualization.arrayToDataTable([
      labels, bardata
    ])

    # The labels are ["x", "label for each column" ....]
    # bardata is [number, number, number] (these numbers are the height of the column)


    chart = new google.visualization.ColumnChart(document.getElementById("enrollment-total-chart"))
    chart.draw(data,
      width: 400
      height: 300
      hAxis:
        title: "Number of students"
      vAxis:
        title: "Number of schools"
      viewWindow:
        max: "auto"
        min: 0
      viewWindowMode: "explicit"
      legend: position: "none"
    )
  • 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-17T08:14:40+00:00Added an answer on June 17, 2026 at 8:14 am

    The issue is likely with your data. For instance, if I make this chart:

    function drawVisualization() {
      // Create and populate the data table.
      var data = google.visualization.arrayToDataTable([
        ['x', 'A', 'B', 'C', 'D', 'E', 'F'],
        ['A',  0,   0,   3,   4,   5,   0],
      ]);
    
      // Create and draw the visualization.
      new google.visualization.ColumnChart(document.getElementById('visualization')).
          draw(data,
               {width:600, height:400,
                hAxis: {title: "Year"}}
          );
    }
    

    There is a lot of white space at the left/right of the chart due to the zeroes (my guess is that you have a lot of zeroes in the extremes).

    I’m a bit confused also by your data — you say you have many different rows, but a histogram is just a pair of X Y data, so the use of color (differentiating the series) is a bit different than a standard histogram.

    If the above doesn’t answer your question, could you please include your data so that we can understand a bit better what you’re trying to do (anonymized if necessary).

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

Sidebar

Related Questions

i am using this: http://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram.html i have an list a that i want to
I have this code that prints out the histogram of the rolls of some
I have two variables that I want to compare in a histogram like the
i want to compare some similar images to find that one, which have a
I have data of students from several schools. I want to show a histogram
I have a process that detects similar images using SURF and I want to
Assume I have a histogram script that builds a 960 500 svg graphic. How
I have this histogram which counts the array d in equally log-spaced bins. max_val=np.log10(max(d))
I have constructed two dictionary that contains histogram values of images. Each dictionary has
I have a list of negative floats. I want to make a histogram with

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.