Vertical lines error

Hi, I’m using DHTMLX 3.5 pro.

Once I set the below code to display vertical lines with given condition. But, it failed with error, “Object does’t support this property or method”.

xAxis:{ lines:true, template:function(obj){ if((charts.indexById(obj.id)%10) == 0){ charts[i][1].config.xAxis.lines = true; return obj.time; } charts[i][1].config.xAxis.lines = false; return ""

Error happened at the below line in dhtmxchart.js.

if((this._settings.offset||i)&&this._settings.xAxis.lines.call(this,data[i]))

Please give me the solution how to fix this.

Hi,

Try the following:

xAxis:{ lines:function(obj){ return !charts.indexById(obj.id)%10; }, template:function(obj){ return (charts.indexById(obj.id)%10)?"":obj.time } }

Thanks, it works.