Combo Graphs: Straight and Curved on Same Graph

669 views
Skip to first unread message

Peter McPhee

unread,
Sep 3, 2019, 8:26:27 AM9/3/19
to Google Visualization API
Hello,

I can see that it is possible to have two different market types on one chart i.e. bar plus line.

However, I can't seem to apply a straight line and a curved line on the same graph. If I apply curveType to the var options it applies to all graphs.

Is it possible to somehow apply curveType: none to one series and curveType: function to another?

Many thanks,

Peter.

Daniel LaLiberte

unread,
Sep 3, 2019, 8:41:01 AM9/3/19
to Google Visualization API
Hi Peter,

The 'series' option lets you specify the curveType for each individual series, which should override the top-level curveType option that applies otherwise.

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/66e9462b-875e-4546-8cc1-f580b16150cb%40googlegroups.com.


--

Peter McPhee

unread,
Sep 3, 2019, 9:12:49 PM9/3/19
to Google Visualization API
Hi Daniel,

Thank you, yes, I see now. I got it to work with the following:

var options = {
title: 'Line vs Curve',
curveType: 'function',
legend: { position: 'bottom' },
series: { 0: { curveType: 'none' }}
};

Thanks,

Peter.
Reply all
Reply to author
Forward
0 new messages