Resize some points in serie
Posted: Mon Nov 26, 2012 8:53 am
Hi
How can resize some points in serie ?
Example
I want set _seriesPoints.Pointer.VertSize and _seriesPoints.Pointer.HorizSize equal new value in field "Y" for the point.
(on start all points must have different vert and horiz size rectangle)
How can do it ?
How can resize some points in serie ?
Example
Code: Select all
DataSet ds = new DataSet();
DataTable dt = new DataTable();
dt.TableName = "myTable";
dt.Columns.Add(new DataColumn("X", System.Type.GetType("System.Double")));
dt.Columns.Add(new DataColumn("Y", System.Type.GetType("System.Double")));
dt.Rows.Add(new Object[] { 1, 1 });
dt.Rows.Add(new Object[] { 2, 2 });
dt.Rows.Add(new Object[] { 3, 3 });
dt.Rows.Add(new Object[] { 4, 4 });
ds.Tables.Add(dt);
Steema.TeeChart.Styles.Points _seriesPoints = new Steema.TeeChart.Styles.Points();
_seriesPoints.Pointer.VertSize = 2;
_seriesPoints.Pointer.HorizSize = 2;
_seriesPoints.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle;
_seriesPoints.DataSource = ds.Tables["myTable"];
_seriesPoints.XValues.DataMember = "X";
_seriesPoints.YValues.DataMember = "Y";
_seriesPoints.Visible = true;
tChart1.Series.Add(_seriesPoints);
Random _rnd = new Random();
for (int i = 0; i < 40; i++) {
ds.Tables["myTable"].Rows[i % 4]["Y"] = _rnd.Next(5);
_seriesPoints.CheckDataSource();
// I think, this must be code or call event changing vert and horiz size rectangle of (i % 4) point
System.Threading.Thread.Sleep(500);
}
(on start all points must have different vert and horiz size rectangle)
How can do it ?