To add more items to a stack, you would add more series to your data, which
means you should add the new data series as a new column.

But you may want to check out the timeline chart which sounds closer to the
kind of use case you describe:
https://developers.google.com/chart/interactive/docs/gallery/timeline

On Tue, Mar 8, 2016 at 8:22 PM, Kok How Teh <[email protected]> wrote:

> Hi Daniel;
>
>     Is there any chart that I could use which would stack on the same bar
> when new values are added? I am trying to visualize the states of a state
> machine and the hAxis / X-Axis is time, Y-Axis is domain and every time the
> state machine changes, a new state (with predefined color for each state)
> is stacked on the same domain bar and people could zoom in / out on the
> bar, imagine that the bar stretches over days / weeks / months.
>
> Regards,
> KH
>
> On Tuesday, March 8, 2016 at 10:28:20 PM UTC+8, Daniel LaLiberte wrote:
>>
>> Hi Kok,
>>
>> First, just to be clear, what we are calling a BarChart is the same as a
>> ColumnChart reoriented so the domain axis is vertical.  They both have the
>> very same data table structure.  If you add rows to the table for a
>> ColumnChart, additional stacked columns would show up on the right.  And if
>> you add rows to the table for the BarChart, additional stacked columns
>> would show up on the bottom. (depending on where you add the rows, and
>> whether you change the 'direction' option).
>>
>> Either chart should work with the 'explorer' option, but the explorer
>> mode does not yet work with discrete (string value) axes.  If your domain
>> values (column 0) are discrete, you could still do some hacking to change
>> your values to integers, and provide formatted values for each.  You would
>> also want to use the explicit 'ticks' option to change how the tick values
>> are displayed.
>>
>> On Tue, Mar 8, 2016 at 4:19 AM, Kok How Teh <[email protected]> wrote:
>>
>>> Hi;
>>>
>>>    I need a horizontal stacked bar which would grow horizontally with
>>> new data added to the data table and being explorable.
>>>
>>>    How do I grow the stacked bar with new data? I expect it to behave
>>> like stacked column chart with addrow(). However, in the case of stacked
>>> bar, it's not row but column instead. Any advice and insight is
>>> appreciated. Thanks.
>>>
>>> Regards,
>>> KH
>>>
>>> --
>>> 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
>>> https://groups.google.com/group/google-visualization-api.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/google-visualization-api/7d638d0e-d3fa-4bb5-8fe0-f3ba892d8e4b%40googlegroups.com
>>> <https://groups.google.com/d/msgid/google-visualization-api/7d638d0e-d3fa-4bb5-8fe0-f3ba892d8e4b%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>
>> [email protected]   5CC, Cambridge 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
> https://groups.google.com/group/google-visualization-api.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-visualization-api/061f62a1-4638-4a43-87b0-e434e09e8ba5%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/061f62a1-4638-4a43-87b0-e434e09e8ba5%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>
[email protected] <[email protected]>   5CC, Cambridge 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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJOen3r8JSZa-16_DOw2q%2BdRN9Uxg1kL54c3nSecbfnZhQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to