Connecting multiple line graph series


#1

I have a bunch of stock price data. When I plot a line graph using it as just a single series, it displays fine. I wanted to chop it into 2 series so that I could have one half be one color and the other another color. Last I read, you need multiple series to do so. However when I do this, I notice that there’s a gap where the first series ends and the second starts. Is there a way to make them continuous as if they were just one single series?


#2

Hi Architekt,

Creating two series to display a colour change in your data is the way I’d recommend doing it.

It sounds like you aren’t adding a data point to connect the first series with the second.

For example, say you want to display data points with x values [1, 2, 3, 4, 5, 6] which you’ve split into two series like so: [1, 2, 3] & [4, 5, 6].

You need to either:

  • add the first point in your second series (in the above example it’s 4) to the end of the first series
  • which results in the x values being displayed to look like: [1, 2, 3, 4] & [4, 5, 6]

OR

  • add the last point in your first series (in the above example it’s 3) to the front of your second series
  • which results in the x values being displayed to look like: [1, 2, 3] & [3, 4, 5, 6]

Let me know if you have any questions.

Kind regards,
Andrew Polkinghorn.


#3

That worked perfectly, thanks!