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 Editing The Code


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

4 Comments

  1. Brian says:

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

    • Sunil Urs says:

      Brian,

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

  2. Paul says:

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

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