colour of dots in point series is not working

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
catchlog
Newbie
Newbie
Posts: 3
Joined: Wed Aug 16, 2006 12:00 am

colour of dots in point series is not working

Post by catchlog » Mon Aug 28, 2006 11:22 pm

Hi,
After ugrading from teechart lite to pro, assigning colours to individual points in a points series when you add a point only seems to work randomly.

Here is the code:
[code]
Points origin = new Points();
origin.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle;
int catchRadius = 5;
origin.Pointer.HorizSize = catchRadius;
origin.Pointer.VertSize = catchRadius;
int dotColour = (int)Math.Round((double)maxCatchColour * ((double)ca.Kg /maxKg),0);
Color col = new Color();
if(dotColour < 20)
col = Color.FromArgb(227,255,94);
else if (dotColour < 40)
col = Color.FromArgb(174,193,84);
else if (dotColour < 60)
col = Color.FromArgb(84,97,23);
else if (dotColour < 80)
col = Color.FromArgb(255,47,47);
else if (dotColour <= 100)
col = Color.FromArgb(172,45,45);

origin.Add(x,y,ca.SpeciesName,col);
origin.Cursor = Cursors.Hand;
[/code]

When there are more than three points some of the points don't pick up the colour set when adding the point (they keep the series colour).
Can any one tell me how to set the colours?

Here is are the chart properties incase they help:
[code]
//
// tchLocationsGraph
//
//
// tchLocationsGraph.Aspect
//
this.tchLocationsGraph.Aspect.View3D = false;
//
// tchLocationsGraph.Axes
//
//
// tchLocationsGraph.Axes.Bottom
//
this.tchLocationsGraph.Axes.Bottom.Automatic = false;
this.tchLocationsGraph.Axes.Bottom.AutomaticMaximum = false;
this.tchLocationsGraph.Axes.Bottom.AutomaticMinimum = false;
this.tchLocationsGraph.Axes.Bottom.Increment = 1;
this.tchLocationsGraph.Axes.Bottom.Maximum = 880;
this.tchLocationsGraph.Axes.Bottom.Minimum = 0;
this.tchLocationsGraph.Axes.Bottom.Visible = false;
this.tchLocationsGraph.Axes.DrawBehind = false;
//
// tchLocationsGraph.Axes.Left
//
this.tchLocationsGraph.Axes.Left.Automatic = false;
this.tchLocationsGraph.Axes.Left.AutomaticMaximum = false;
this.tchLocationsGraph.Axes.Left.AutomaticMinimum = false;
this.tchLocationsGraph.Axes.Left.Increment = 1;
//
// tchLocationsGraph.Axes.Left.Labels
//
this.tchLocationsGraph.Axes.Left.Labels.Style = Steema.TeeChart.AxisLabelStyle.None;
this.tchLocationsGraph.Axes.Left.Labels.Visible = false;
this.tchLocationsGraph.Axes.Left.Maximum = 0;
this.tchLocationsGraph.Axes.Left.Minimum = -623;
//
// tchLocationsGraph.Axes.Left.Title
//
this.tchLocationsGraph.Axes.Left.Title.Visible = false;
this.tchLocationsGraph.Axes.Left.Visible = false;
//
// tchLocationsGraph.Axes.Right
//
this.tchLocationsGraph.Axes.Right.Visible = false;
//
// tchLocationsGraph.Axes.Top
//
this.tchLocationsGraph.Axes.Top.Visible = false;
this.tchLocationsGraph.Axes.Visible = false;
this.tchLocationsGraph.BackColor = System.Drawing.Color.Transparent;
this.tchLocationsGraph.Cursor = System.Windows.Forms.Cursors.Arrow;
//
// tchLocationsGraph.Header
//
this.tchLocationsGraph.Header.AdjustFrame = false;
this.tchLocationsGraph.Header.Lines = new string[] {
"TeeChart"};
this.tchLocationsGraph.Header.Visible = false;
//
// tchLocationsGraph.Legend
//
this.tchLocationsGraph.Legend.ResizeChart = false;
this.tchLocationsGraph.Legend.Visible = false;
this.tchLocationsGraph.Location = new System.Drawing.Point(0, 0);
this.tchLocationsGraph.Name = "tchLocationsGraph";
//
// tchLocationsGraph.Panel
//
//
// tchLocationsGraph.Panel.Bevel
//
this.tchLocationsGraph.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None;
//
// tchLocationsGraph.Panel.Brush
//
this.tchLocationsGraph.Panel.Brush.Color = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(255)));
//
// tchLocationsGraph.Panel.Brush.Gradient
//
this.tchLocationsGraph.Panel.Brush.Gradient.Transparency = 100;
this.tchLocationsGraph.Panel.ImageMode = Steema.TeeChart.Drawing.ImageMode.Normal;
this.tchLocationsGraph.Panel.MarginBottom = 0;
this.tchLocationsGraph.Panel.MarginLeft = 0;
this.tchLocationsGraph.Panel.MarginRight = 0;
this.tchLocationsGraph.Panel.MarginTop = 0;
this.tchLocationsGraph.Size = new System.Drawing.Size(536, 224);
this.tchLocationsGraph.TabIndex = 2;
//
// tchLocationsGraph.Walls
//
//
// tchLocationsGraph.Walls.Back
//
//
// tchLocationsGraph.Walls.Back.Brush
//
this.tchLocationsGraph.Walls.Back.Brush.Color = System.Drawing.Color.FromArgb(((System.Byte)(38)), ((System.Byte)(192)), ((System.Byte)(192)), ((System.Byte)(192)));
//
// tchLocationsGraph.Walls.Back.Brush.Gradient
//
this.tchLocationsGraph.Walls.Back.Brush.Gradient.Transparency = 85;
this.tchLocationsGraph.Walls.Back.Visible = false;
//
// tchLocationsGraph.Walls.Bottom
//
this.tchLocationsGraph.Walls.Bottom.Visible = false;
//
// tchLocationsGraph.Walls.Left
//
this.tchLocationsGraph.Walls.Left.Visible = false;
this.tchLocationsGraph.Walls.Visible = false;
//
// tchLocationsGraph.Zoom
//
this.tchLocationsGraph.Zoom.Allow = false;
this.tchLocationsGraph.Zoom.MouseButton = System.Windows.Forms.MouseButtons.XButton1;
//
// tchLocationsGraph.Zoom.Pen
//
this.tchLocationsGraph.Zoom.Pen.Visible = false;
this.tchLocationsGraph.ClickSeries += new Steema.TeeChart.TChart.SeriesEventHandler(this.tChart1_ClickSeries);
[/code][/code]

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Tue Aug 29, 2006 7:11 am

Hi.

It might help setting point series ColorEach property to true:

Code: Select all

origin.ColorEach = true;
Marjan Slatinek,
http://www.steema.com

catchlog
Newbie
Newbie
Posts: 3
Joined: Wed Aug 16, 2006 12:00 am

still not working

Post by catchlog » Tue Aug 29, 2006 7:27 am

I tried origin.ColorEach = true, about half the points are still not reflection the colour passed in when we add them.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Aug 29, 2006 8:32 am

Hi catchlog,

Could you please send us an example we can run "as-is" to reproduce the problem here?

You can post your files at news://www.steema.net/steema.public.attachments newsgroup.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

catchlog
Newbie
Newbie
Posts: 3
Joined: Wed Aug 16, 2006 12:00 am

Post by catchlog » Thu Aug 31, 2006 4:30 am

Thanks for the help but I've got it to work now. i'm just adding the origin series for each dot.

Post Reply