0

I'd like to add a line plot/graph to an existing combo chart - see combo chart fiddle.. The data I want to use for the line plot ideally is something like this:

["Set 1", 900]
["Set 2", 700]
["Set 3", 500]
["Set 4", 300]
["Set 5", 100]

Now I've been through the official line graph visualization tutorial here and been through example post such as these which have been of great help in working out how independent line graphs are generated.

But my objective is to plot several line graphs in the same plot as my working combo chart as seen in this screenshot.

Community
  • 1
  • 1
ANM
  • 65
  • 1
  • 4
  • 11
  • I've done similar charts before and if I remember correctly the combo didn't combine well with the dual axis. Also, your fiddle doesn't work. – drs9222 Apr 16 '15 at 13:54
  • I see .. Could you kindly suggest a way forward – ANM Apr 16 '15 at 17:18
  • Sorry for the delay on getting back to you. I had to leave right after I commented yesterday and didn't get back to my home PC until now. I've updated the "answer" I gave at work today to have a real solution for you. Hope it helps. – drs9222 Apr 18 '15 at 01:33

1 Answers1

0

Edited to provide a real answer....

Your issue was the index on your series. You have 2 series but the index was 0 base you were trying to turn the third into a line.

So this

series: {2: {type: "line"}}

needs to be this

series: {1: {type: "line"}}

Also, I believe the issue I mentioned in the comment was wrong. I think you can do both a combo chart and a dual axis but you might run into issues with scale.

See this fiddle.

drs9222
  • 4,448
  • 3
  • 33
  • 41
  • Really appreciate the help .. dunno how I would have figured out how to add independent line graphs into a combo chart .. I built on your fiddle here it is: https://jsfiddle.net/dr5eaevq/5/ – ANM Apr 19 '15 at 13:22