jack
jack

Reputation: 454

Jqplot, multiple line type

How do I make multiple line types in a single plot in jqPlot?

The following would display 3 lines in dotted, but what if I want line 1 to be dotted and line 2 to be solid?

plot = $.jqplot("myplot", [line1, line2, line3], {
    seriesDefaults : {
        linePattern : 'dotted',
        showMarker : false,
        shadow : false
    },
    ...
});

Upvotes: 3

Views: 4215

Answers (1)

Boro
Boro

Reputation: 7943

You could do it in a similar way as they do it here in the bottom most example for marks you just need to specify your patter for each line accordingly.

This jsfiddle show exactly how it is used.

Upvotes: 3

Related Questions