Hi,
i created a custom layer and i am adding a polyline to custom layer but it doesn't seems to work.
Custom Layer Code
{
return;
IAdvanceAxis yAxis = Grid["Y"] as IAdvanceAxis;
List<DataPoint> lsNewPoints = new List<DataPoint>();
int x = (int)(double)yAxis.MapInverse(val);
DataPoint newPoint = new DataPoint(x, y);
scene.Add(newPoint);
}
myPolyLine.PE.StrokeWidth = 2;
scene.Add(myPolyLine);
Main Chart Code
dt.Columns.Add("First", typeof(double));
dt.Rows.Add(1, 1);
dt.Rows.Add(10, 10);
dt.Rows.Add(20, 20);
dt.Rows.Add(30, 30);
dt.Rows.Add(40, 40);
dt.Rows.Add(50, 50);
ultraChart1.ScatterChart.ColumnX = 1;
ultraChart1.ScatterChart.ColumnY = 0;
ultraChart1.DataSource = dt;
ultraChart1.InvalidateLayers();
I am not sure why custom layer is not adding the polyline..
It would be helpful if any one can point me in right direction... Let me know if you need more info...
Thanks,
KK
check the actual points you are passing into that line and see if they would fit on the chart. i think you should be using the axis.Map function instead of MapInverse.