lineThickness: Number

Sets the thickness of line in line charts and area charts.


Default: 2
Example: 3,4..

Notes
  • In area charts you can disable line by setting lineThickness to 0.
var  chart =  new  CanvasJS.Chart("container",
{
 .
 .
 data: [{
   type: "line",
   lineThickness: 5,
 }],
 .
 . 
});
chart.render();



Try it Yourself by Editing the Code below.


Below is one more example with combination charts

Try it Yourself by Editing the Code below.



If you have any questions, please feel free to ask in our forums.Ask Question

Comments 16

      • Any idea when this will be implemented? We need to plot forecasted data which we currently represent as a dashed line. In addition to the forecasted data we plot actual data in the same chart which would be displayed as a normal line. We are also open to suggestions for alternatives in representing actual data + forecasted data in the same chart. Thanks.

        • Pauline,

          Sorry, as of now we don’t have any time line for dashed line. For now best option would be to differentiate using lineThickness and color.

  1. Please see http://abacharts.com. After you click the start button, why is the line so thick in the beginning? Then it gets thin after about 45 seconds. I want it to be thin all the time, but it is ignoring my lineThickness setting of 1 until 45 seconds or so into the chart.

If you have any questions, please feel free to ask in our forums. Ask Question