Tong,

The height of each bar will be approximately the height of the chartArea
divided by the number of bars, where the chartArea is the area that the
bars are actually drawn within, inside the axis bounds.  You can set the
chartArea.height, but keep in mind that the overall chart height is equal
to the sum of the chartArea.height, the chartArea.top and the bottom area.
  You can't currently set the bottom area (under the chartArea), because it
just gets the leftover space.

On Mon, Sep 7, 2015 at 11:43 AM, Tong Sun <[email protected]> wrote:

> Hi,
>
> I have a challenging issue to overcome -- how to properly size up a
> dynamic bar chart? I.e. to adjust its height automatically when the number
> of rows changes dramatically.
>
> Here is my problem,
>
> My bar chart have nearly hundred of rows, and I'm using Sergey's following
> trick to pick sections when I want. So the final chart may have 10 or
> 100 rows, depending on the situation, which doesn't work well under a fixed
> chart height.
>
> I saw controls for height of the chart, or chartArea, but what I really
> need is the height of each bar for the bar chart. I.e., regardless whether
> my bar chart has 10 or 100 rows, each bar in the chart will show same
> width. The total height of the chart will grow or shrink accordingly. How
> can it be done?
>
> PS. I tried to use `<div id="chart_div"></div>` so as to allow google bar
> chart to figure out the height automatically, but the graph looks really
> tiny -- https://jsfiddle.net/6g25g4b1/
>
> Please help.
>
> Thanks
>
>
> On Friday, February 6, 2015 at 10:07:50 AM UTC-5, Tong Sun wrote:
>>
>>
>> On Fri, Feb 6, 2015 at 9:57 AM, 'Sergey Grabkovsky' via Google
>> Visualization API wrote:
>>
>>>
>>> Here's a pretty simple example of what I think you're looking for:
>>> http://jsfiddle.net/12r0ztoa/5/
>>>
>>
>> Yes, YES! that is nice wonderful masterpiece that I can never come up
>> with on my own. Thanks a million. I own you Sergey!
>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to
> [email protected].
> Visit this group at
> http://groups.google.com/group/google-visualization-api.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-visualization-api/234d366c-e288-4b7a-989d-cc687b2a8887%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/234d366c-e288-4b7a-989d-cc687b2a8887%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>  -
978-394-1058
[email protected] <[email protected]>   5CC, Cambridge MA
[email protected] <[email protected]> 9 Juniper Ridge
Road, Acton MA

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJMwvg1YNFifh-F6tML2g3QsoAnr%3D6avqVpxq7F5PJyj7w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to