For 2D line chart, you can change the color of the line based on the (x, y) position. Unluckily, the same method would not look right in 3D. If you need a line with multiple colors, you would need to draw it as multiple line segments, so you can control the color of each line segment. This method is more flexible as the line can be colored based on any criteria you like. An example is at: