Scatter Plot

I was wondering if there is a way to plot points onto the chart. An example is that if I plot (1,2), (1,3), (1,4) I’d expect to see three points in vertical line as opposed to a time series of 2,3,4.

If not, is this functionality expected to be added?

Thanks for your time,
Michael

It is not supported currently and so far we have not plans to implement the one
( it doesn’t seems technically difficult, we can provide some hints how it can be implemented through custom code if you are interested )

That would be great - I’ve looked a couple of different plotting utilities for mobile devices but your documentation/support has been a step ahead of the competition as usual.

Thanks,
Michael

You can define custom data rendering function as

[code] dhx.chart.plot={
pvt_render_plot:function(ctx, data, point1, point2, sIndex, map){
for (var i = 0; i < data.length; i++) {
var x0 = 20+data[i].x;
var y0 = 20+data[i].y;
var text = data[i].text;

				ctx.lineWidth = 2;
				ctx.fillStyle = "red";
				ctx.strokeStyle = "green";
				ctx.beginPath();
				ctx.arc(x0,y0,5,0,Math.PI*2,true);
				ctx.fill();
				ctx.stroke();

				this.renderTextAt(false, true, x0,y0+5,text);
			};
		}
	};[/code]

and later use it in chart as

view:"chart", type:"plot", id:"mychart", data: [{ x:100, y:50, text:"a1"},{ x:120, y:50, text:""},{ x:8, y:7, text:""},{ x:30, y:15, text:"b1"},{ x:45, y:15, text:""}]