user2054680
user2054680

Reputation:

How to increase line width of line-charts?

Is there any option available for increasing the line width of line-charts? I have tried to alter the stroke, but that does not seem to have any affect.

Here is how the line-chart is initialized:

paper.linechart(10, 30, 400, 240, [
    [5, 10, 15, 20, 25, 30, 35]
], [
    [15, 10, 20, 14, 13, 17, 9],
    [7, 13, 17, 9, 10, 20, 14],
    [5, 4, 14, 12, 20, 3, 16]
]);

Upvotes: 2

Views: 189

Answers (1)

Eliran Malka
Eliran Malka

Reputation: 16263

Currently your only option would be to specify a higher width value in the options. From the documentation, under the width property of Paper.lineChart's options:

(width) controls the size of the plotted symbol. Also controls the thickness of the line using a formula stroke-width=width/2.

To only control the line's stroke-width, you should be able to pass an empty symbol and the desired width value to the opts, e.g.:

paper.linechart(10, 30, 400, 240, [
    [5, 10, 15, 20, 25, 30, 35]
], [
    [15, 10, 20, 14, 13, 17, 9],
    [7, 13, 17, 9, 10, 20, 14],
    [5, 4, 14, 12, 20, 3, 16]
], {
    symbol: '',
    width: 5
});

(You can pass circle as a symbol, of course, but its size will be derived from the width value).

Upvotes: 1

Related Questions