ColorMember works ALMOST for all points in a serie
ColorMember works ALMOST for all points in a serie
Hi
I'm using ColorMember method with ASP.NET.
Almost all the points (28 on 32) receive the correct color property specifie in a DataTable. But the series show 4 points with random Color.
When I look into my dataSet at execution I see "Color [Blue]" but it show a Yellow, Gray and Green points.
I'm using the last buid package (1.1.1499.42325).
Do you have any clue for me ? thanks
I'm using ColorMember method with ASP.NET.
Almost all the points (28 on 32) receive the correct color property specifie in a DataTable. But the series show 4 points with random Color.
When I look into my dataSet at execution I see "Color [Blue]" but it show a Yellow, Gray and Green points.
I'm using the last buid package (1.1.1499.42325).
Do you have any clue for me ? thanks
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi Simon,
Many thanks,
Would you be so kind as to send me an example code snippet so that I can reproduce the problem here?Almost all the points (28 on 32) receive the correct color property specifie in a DataTable. But the series show 4 points with random Color.
Many thanks,
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
my ScreenShoot
Hi,
I think this screenShoot can explain easilly my problem :
the ScreenShoot show 4 points with the wrong color. I can be sure the ColorMember is correct by the Mark directly bind from the Color Colums. Here a sample of my code, (really basic)
I bind the ColorMember with a columns (dataType System.Drawing.Color)
styleBubble.ColorMember = mTable.Columns["Couleur"].ToString();
I have really no idea what to do with this problem. If the picture is cannot be see, you can give me an e-mail adress and I will send it.
thanks lot.
I think this screenShoot can explain easilly my problem :
the ScreenShoot show 4 points with the wrong color. I can be sure the ColorMember is correct by the Mark directly bind from the Color Colums. Here a sample of my code, (really basic)
Code: Select all
private bool initialiseSerie()
{
Steema.TeeChart.Styles.Bubble styleBubble = new Steema.TeeChart.Styles.Bubble(webChart.Chart);
//Creation des Evenements associés a la série
styleBubble.GetPointerStyle += new Steema.TeeChart.Styles.CustomPoint.GetPointerStyleEventHandler(bubbleSeries1_GetPointerStyle);
styleBubble.GetSeriesMark += new Steema.TeeChart.Styles.CustomPoint.GetSeriesMarkEventHandler(bubbleSeries1_GetSeriesMark);
//Création de l'axe des X
styleBubble.DataSource = mTable;
styleBubble.XValues.DataMember = mTable.Columns["Jour_rabotage"].ToString();
styleBubble.XValues.DateTime = true;
//Création de l'Axe des Y
styleBubble.YValues.DataMember = mTable.Columns[ddlAxeY.SelectedItem.Text].ToString();
//Spécification de la taille des bulles
styleBubble.RadiusValues.DataMember = mTable.Columns["Radius"].ToString();
//Spécification de la couleur des bulles
styleBubble.ColorMember = mTable.Columns["Couleur"].ToString();
//Spécification de la propriétés de MARK.
styleBubble.Marks.Visible = true;
styleBubble.Marks.Color = Color.Beige;
styleBubble.Marks.Transparent = false;
styleBubble.Marks.ArrowLength = 20;
styleBubble.Marks.Arrow.Color = Color.Black;
styleBubble.Marks.Bevel.Width= 7;
styleBubble.Marks.Brush.Color = Color.Beige;
styleBubble.Marks.ShapeStyle = Steema.TeeChart.Drawing.TextShapeStyle.RoundRectangle;
//MAJ des propriétées quelconques de la série
styleBubble.ShowInLegend = false;
webChart.Chart.Series.Add(styleBubble);
return true;
}
I bind the ColorMember with a columns (dataType System.Drawing.Color)
styleBubble.ColorMember = mTable.Columns["Couleur"].ToString();
I have really no idea what to do with this problem. If the picture is cannot be see, you can give me an e-mail adress and I will send it.
thanks lot.
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi --
I get a runtime exception.
Mmm .. how are you doing this? When I do this:I bind the ColorMember with a columns (dataType System.Drawing.Color)
Code: Select all
DataColumn colColor = new DataColumn("colColor",Type.GetType("System.Drawing.Color", true));
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
humm, not exactly
Hi Christopher,
You're right, I use a Object dataype. Here the code where I create the color's column. I fill this colums with Color object System.Drawing.Color.
later, I bind the colorMember with this colums :
As I send in my previous e-mail (ScreenShoot), I also show the value of the columns "Couleur" in the mark property.
I have absolutly no idea what I'm doing wrong but I still try to control the color of each point in a serie. Do you have any clues ?
thanks lot
You're right, I use a Object dataype. Here the code where I create the color's column. I fill this colums with Color object System.Drawing.Color.
Code: Select all
DataColumn myColumn = new DataColumn();
myColumn.DataType = System.Type.GetType("System.Object");
myColumn.AllowDBNull = false;
myColumn.Caption = "Couleur";
myColumn.ColumnName = "Couleur";
myColumn.DefaultValue = Color.Black;
mTable.Columns.Add(myColumn);
Code: Select all
//Spécification de la couleur des bulles
styleBubble.ColorMember = mTable.Columns["Couleur"].ToString();
I have absolutly no idea what I'm doing wrong but I still try to control the color of each point in a serie. Do you have any clues ?
thanks lot
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi --
Does this code work OK at your end? If so, you might be inadvertantly changing something in the PointerStyleEvent.
Mmm ... the following code works fine here:I have absolutly no idea what I'm doing wrong but I still try to control the color of each point in a serie. Do you have any clues ?
Code: Select all
tChart1.Aspect.View3D = false;
Random r=new Random(10);
DataTable myTable = new DataTable("myTable");
DataColumn colXVal = new DataColumn("XVal",Type.GetType("System.DateTime"));
DataColumn colData = new DataColumn("Data",Type.GetType("System.Int32"));
DataColumn colRad = new DataColumn("Rad",Type.GetType("System.Int32"));
DataColumn colCol = new DataColumn("Color",Type.GetType("System.Object"));
myTable.Columns.Add(colXVal);
myTable.Columns.Add(colData);
myTable.Columns.Add(colRad);
myTable.Columns.Add(colCol);
DateTime today = DateTime.Today;
DataRow NewRow;
for(int i = 0; i <50; i++) {
NewRow = myTable.NewRow();
NewRow["XVal"] = today;
NewRow["Rad"] = r.Next(5);
NewRow["Data"] = r.Next(10);
NewRow["Color"] = Color.Aqua;
today=today.AddDays(1);
myTable.Rows.Add(NewRow);
}
tChart1.Series[0].XValues.DateTime = true;
bubble1.RadiusValues.DataMember=colRad.ToString();
tChart1.Series[0].XValues.DataMember=colXVal.ToString();
tChart1.Series[0].YValues.DataMember=colData.ToString();
tChart1.Series[0].ColorMember=colCol.ToString();
tChart1.Series[0].DataSource=myTable;
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
I create a small exemple for U
Hi Christopher,
I try your exemple and it work fine with my system to.
I have modify your exemple and I use the operator % (modulo).
Every columns in my exemple is suppose to have the same color.
I invite you to try my script to be sure the problem is not comming from my system
as I wrote in my first mail, I'm using asp.net with the last buid package (1.1.1499.42325).
Many thanks,
I try your exemple and it work fine with my system to.
I have modify your exemple and I use the operator % (modulo).
Every columns in my exemple is suppose to have the same color.
I invite you to try my script to be sure the problem is not comming from my system
Code: Select all
Color[] tab_couleur = { Color.Red, Color.Orange, Color.Yellow, Color.LightGreen, Color.Green};
Steema.TeeChart.Chart tChart1 = webChart.Chart;
Steema.TeeChart.Styles.Bubble bubble1 = new Steema.TeeChart.Styles.Bubble(tChart1);
tChart1.Aspect.View3D = false;
DataTable myTable = new DataTable("myTable");
DataColumn colXVal = new DataColumn("XVal",Type.GetType("System.Int32"));
DataColumn colData = new DataColumn("Data",Type.GetType("System.Int32"));
DataColumn colRad = new DataColumn("Rad",Type.GetType("System.Int32"));
DataColumn colCol = new DataColumn("Color",Type.GetType("System.Object"));
myTable.Columns.Add(colXVal);
myTable.Columns.Add(colData);
myTable.Columns.Add(colRad);
myTable.Columns.Add(colCol);
DataRow NewRow;
for(int i = 0; i <50; i++)
{
NewRow = myTable.NewRow();
NewRow["XVal"] = i%5;
NewRow["Rad"] = 2;
NewRow["Data"] = i;
NewRow["Color"] = tab_couleur[i%5];
myTable.Rows.Add(NewRow);
}
bubble1.RadiusValues.DataMember=colRad.ToString();
tChart1.Series[0].XValues.DataMember=colXVal.ToString();
tChart1.Series[0].YValues.DataMember=colData.ToString();
tChart1.Series[0].ColorMember=colCol.ToString();
tChart1.Series[0].DataSource=myTable;
Many thanks,
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi --
Because you are using the % operator you will have to set:
Because you are using the % operator you will have to set:
Which corrects the problem.tChart1.Series[0].XValues.Order = ValueListOrder.None;
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/