Page 1 of 1

Dashed or dotted line

Posted: Tue Nov 05, 2013 10:50 am
by 16666982
Hello, is there a way to plot dashed or dotted line? Can't find such property or any example in demos

Re: Dashed or dotted line

Posted: Tue Nov 05, 2013 11:43 am
by narcis
Hi Igor,

Yes, you can do this:

Code: Select all

 function setAxisDash(axis,value) {
  if (value=="solid")
     axis.grid.format.stroke.dash=null;
  else
  if (value=="dash")
     axis.grid.format.stroke.dash=[4,4];
  else
     axis.grid.format.stroke.dash=[2,2];
}
This is a code snippet from the GridBands example at the Axes section in this demo.

Re: Dashed or dotted line

Posted: Tue Nov 05, 2013 11:59 am
by 16666982
I got it, thank you very much!

Re: Dashed or dotted line

Posted: Tue Nov 05, 2013 12:32 pm
by narcis
Hi Igor,

It would be almost the same:

Code: Select all

Chart1.series.items[0].format.stroke.dash=[4,4];
.