almende / vis

⚠️ This project is not maintained anymore! Please go to https://github.com/visjs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible to have a single line be drawn with multiple colors based on the data?

nsarka opened this issue · comments

I'm using the example from here: http://visjs.org/examples/graph2d/15_streaming_data.html

What I was wondering is if that blue line in some areas can be shaded red or green depending on an extra field added to the data.

For example,
{
x: now,
y: bytes_transferred
color: algorithm_currently_being_used()
}
where algorithm_currently_being_used() returns some color to distinguish which algorithm is in use.

I've already tried creating groups for each algorithm and then styling the group with a color, but vis will treat each group as a separate line instead of one line that just changes color.