Hi Manimala,
Thanks you for you help.
I used following code to draw points chart. I want to show the point as red-circle with size(1,1). But the point always diaplay as black-circle. see my attached screen-shot.
I want to know what's wrong with my code.
Is the chart type correct for point chart ?
series.Type = ChartSeriesType.Scatter;
Thanks you very much.
private void InitializeCurveData(decimal from, decimal to )
{
// Hide the chart object to speed up drawing process.
chtModel.BeginUpdate();
chtModel.Series.Clear();
//set type
ChartSeries series=chtModel.Model.NewSeries("GPSCurve");
chtModel.Series.Add(series);
//I want to display point as a red circle
series.Type = ChartSeriesType.Scatter;
System.Drawing.Color pIndexColor = new Color();
pIndexColor=Color.Red;
series.Style.Interior =
new Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.GradientStyle.None,
pIndexColor, pIndexColor);
series.Style.Border.Color = pIndexColor;
series.Style.Symbol.Shape = ChartSymbolShape.Circle;
series.Style.Symbol.Size=new Size(1,1);
series.Style.Symbol.Color =pIndexColor;
//add points
DataTable dtGPS=BL.Access.LoadDataTable("working_cl","ppgps_order,PP_CL_NORTHING,PP_CL_EASTING",
string.Format("ppgps_order>={0} and ppgps_order<={1}",from,to));
DataRow[] rows=dtGPS.Select("","ppgps_order asc");
double MIN_EASTING=double.MaxValue;
double MIN_NORTHING=double.MaxValue;
double MAX_EASTING=double.MinValue;
double MAX_NORTHING=double.MinValue;
for(int i = 0; i < rows.Length; i++)
{
DataRow row=rows[i];
if ((row["PP_CL_NORTHING"]==DBNull.Value) || (row["PP_CL_EASTING"]==DBNull.Value)) continue;
double PP_CL_NORTHING=Convert.ToDouble(row["PP_CL_NORTHING"]);
double PP_CL_EASTING=Convert.ToDouble(row["PP_CL_EASTING"]);
series.Points.Add(PP_CL_EASTING,PP_CL_NORTHING);
//min
if (PP_CL_NORTHING
if (PP_CL_EASTING if (PP_CL_NORTHING>MAX_NORTHING) MAX_NORTHING=PP_CL_NORTHING;
if (PP_CL_EASTING>MAX_EASTING) MAX_EASTING=PP_CL_EASTING;
}
//customize X-axes Y-axes
double SCALE=Math.Max(MAX_NORTHING-MIN_NORTHING,MAX_EASTING-MIN_EASTING);
double INTERVAL=SCALE/10;
//adjust MIN to make the scurve in middle
if (MAX_NORTHING-MIN_NORTHING>MAX_EASTING-MIN_EASTING)
{
MIN_EASTING=MIN_EASTING-(MIN_EASTING+SCALE-MAX_EASTING)/2;
}
else
{
MIN_NORTHING=MIN_NORTHING-(MIN_NORTHING+SCALE-MAX_NORTHING)/2;
}
chtModel.PrimaryXAxis.Title = "Easting";
chtModel.PrimaryYAxis.Title="Northing";
chtModel.LegendPosition=ChartDock.Right;
chtModel.PrimaryYAxis.RangeType = ChartAxisRangeType.Set;
chtModel.PrimaryYAxis.Range.Min = MIN_NORTHING-INTERVAL/2;
chtModel.PrimaryYAxis.Range.Max = MIN_NORTHING+SCALE+INTERVAL/2;//MAX_NORTHING;
chtModel.PrimaryYAxis.Range.Interval =INTERVAL;
chtModel.PrimaryXAxis.RangeType = ChartAxisRangeType.Set;
chtModel.PrimaryXAxis.Range.Min =MIN_EASTING-INTERVAL/2;
chtModel.PrimaryXAxis.Range.Max =MIN_EASTING+SCALE+INTERVAL/2;//MAX_EASTING;
chtModel.PrimaryXAxis.Range.Interval = INTERVAL;
chtModel.PrimaryXAxis.LabelRotate = true;
chtModel.PrimaryXAxis.LabelRotateAngle = 315;
// Now show the chart.
chtModel.EndUpdate();
}
PointChart_d96a8cce.zip