Google chart 2 stacked columns and line chart

44 views
Skip to first unread message

Artūras Šliažas

unread,
Jun 1, 2016, 5:32:27 AM6/1/16
to Google Visualization API

This is what I have so far:

https://jsfiddle.net/5yv936sr/1/

The thing is that I want 2 stacked columns for columns 0-3 and 4-7, and then one line chart for column 8. So far I can't get a result I'm expecting. I'm getting one stacked column only.

Daniel LaLiberte

unread,
Jun 1, 2016, 9:39:49 AM6/1/16
to Google Visualization API
Hi Artūras,

The best you can do now is something like this hack:  https://jsfiddle.net/dlaliberte/5yv936sr/3/

The Material Bar chart can show multiple groups of stacks, but it cannot combine bars with lines.

--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
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/2421a059-7a94-40f4-a667-7c7553ec3a67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Artūras Šliažas

unread,
Jun 1, 2016, 10:59:51 AM6/1/16
to Google Visualization API
Awesome workaround! Thank You :)


2016 m. birželis 1 d., trečiadienis 16:39:49 UTC+3, Daniel LaLiberte rašė:
Hi Artūras,

The best you can do now is something like this hack:  https://jsfiddle.net/dlaliberte/5yv936sr/3/

The Material Bar chart can show multiple groups of stacks, but it cannot combine bars with lines.
On Wed, Jun 1, 2016 at 5:32 AM, Artūras Šliažas <sliazas...@gmail.com> wrote:

This is what I have so far:

https://jsfiddle.net/5yv936sr/1/

The thing is that I want 2 stacked columns for columns 0-3 and 4-7, and then one line chart for column 8. So far I can't get a result I'm expecting. I'm getting one stacked column only.

--
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 google-visualization-api+unsub...@googlegroups.com.



--

Artūras Šliažas

unread,
Jun 7, 2016, 6:25:11 AM6/7/16
to Google Visualization API
Do you know how I could make tooltip to display 1, 2.. instead of 0.85, 1.15, 1.85, 2.15 when hovering on lines and bars?

2016 m. birželis 1 d., trečiadienis 16:39:49 UTC+3, Daniel LaLiberte rašė:
Hi Artūras,

The best you can do now is something like this hack:  https://jsfiddle.net/dlaliberte/5yv936sr/3/

The Material Bar chart can show multiple groups of stacks, but it cannot combine bars with lines.
On Wed, Jun 1, 2016 at 5:32 AM, Artūras Šliažas <sliazas...@gmail.com> wrote:

This is what I have so far:

https://jsfiddle.net/5yv936sr/1/

The thing is that I want 2 stacked columns for columns 0-3 and 4-7, and then one line chart for column 8. So far I can't get a result I'm expecting. I'm getting one stacked column only.

--
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 google-visualization-api+unsub...@googlegroups.com.



--

Daniel LaLiberte

unread,
Jun 7, 2016, 6:30:27 AM6/7/16
to Google Visualization API
You'll have to add the formatted representation of each value to your datatable.  Instead of just 0.85, replace it with { v: 0.85, f: "1" }.    Or call setFormattedValue() for each cell value in the table.  (see https://developers.google.com/chart/interactive/docs/reference#DataTable_setFormattedValue )


On Tue, Jun 7, 2016 at 6:25 AM, Artūras Šliažas <sliazas...@gmail.com> wrote:
Do you know how I could make tooltip to display 1, 2.. instead of 0.85, 1.15, 1.85, 2.15 when hovering on lines and bars?

2016 m. birželis 1 d., trečiadienis 16:39:49 UTC+3, Daniel LaLiberte rašė:
Hi Artūras,

The best you can do now is something like this hack:  https://jsfiddle.net/dlaliberte/5yv936sr/3/

The Material Bar chart can show multiple groups of stacks, but it cannot combine bars with lines.
On Wed, Jun 1, 2016 at 5:32 AM, Artūras Šliažas <sliazas...@gmail.com> wrote:

This is what I have so far:

https://jsfiddle.net/5yv936sr/1/

The thing is that I want 2 stacked columns for columns 0-3 and 4-7, and then one line chart for column 8. So far I can't get a result I'm expecting. I'm getting one stacked column only.

--
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 google-visualizati...@googlegroups.com.



--

--
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 google-visualizati...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.

For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages