lineDashType: String

Sets the Line Dash Type for all Line and Area Charts.


Default: solid
Example: “dot”, “dash”, etc.

Other Supported Dash Types:

  • “solid”
  • “shortDash”
  • “shortDot”
  • “shortDashDot”
  • “shortDashDotDot”
  • “dot”
  • “dash”
  • “dashDot”
  • “longDash”
  • “longDashDot”
  • “longDashDotDot”

Note
  • Supported with all Line and Area Charts.

var  chart =  new  CanvasJS.Chart("container",
{
 .
 .
data:[{
     type: "line",
     lineDashType: "dot",

}]
});
chart.render();


Try it Yourself by Editing the Code below.



In order to provide better support,we have closed the comments and switched completely to our Forums.
If you have any questions, please feel free to ask in our forums.

Comments 4

  1. Can you confirm if lineDashType is supposed to work in IE10? I can get it to work in IE11 but not 10.

    • Brian,

      Canvas element in IE10 does not support this feature. But we are trying to find a workaround.

  2. As I tested each of these to see what they looked like, i noticed that “shotDash” should probably be “shortDash”

In order to provide better support,we have closed the comments and switched completely to our Forums.
If you have any questions, please feel free to ask in our forums.