Contour with Custom Pallette
Contour with Custom Pallette
Hello,
I can't seem to work out how to apply a custom colour pallette to a contour type series, can anyone help?
Thanks
Dave
I can't seem to work out how to apply a custom colour pallette to a contour type series, can anyone help?
Thanks
Dave
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Dave,
I'm not able to reproduce the issue here using latest TeeChart for .NET v3 release available at the clien area (build 3.5.3225.32183/4/5) and code snippet below. Could you please modify the example so that we can reproduce the problem here and let us know the TeeChart version you are using?
Thanks in advance.
I'm not able to reproduce the issue here using latest TeeChart for .NET v3 release available at the clien area (build 3.5.3225.32183/4/5) and code snippet below. Could you please modify the example so that we can reproduce the problem here and let us know the TeeChart version you are using?
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
Steema.TeeChart.Styles.Contour contour1 = new Steema.TeeChart.Styles.Contour(tChart1.Chart);
contour1.FillSampleValues();
Steema.TeeChart.Tools.CursorTool cursor1 = new Steema.TeeChart.Tools.CursorTool(tChart1.Chart);
cursor1.Series = contour1;
cursor1.FollowMouse = true;
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
I still seem to be having problems.
I've uploaded a demo project on the upload page called CursorProblem.zip.
The example shows two problems which are probably related.
1: Notice that on startup it sets the cursor position to 10,10
cursor1.XValue = 10;
cursor1.YValue = 10;
However you can see that one of the cursors stays at 0.
2: The text boxes show the cursor positions and you can see that the cursors Z position isnt changing.
Can you help?
Thanks in advance,
Dave
I've uploaded a demo project on the upload page called CursorProblem.zip.
The example shows two problems which are probably related.
1: Notice that on startup it sets the cursor position to 10,10
cursor1.XValue = 10;
cursor1.YValue = 10;
However you can see that one of the cursors stays at 0.
2: The text boxes show the cursor positions and you can see that the cursors Z position isnt changing.
Can you help?
Thanks in advance,
Dave
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Dave,
Thanks for the example project.
This is because CursorTool is not designed for X,Y and Z series. However, I think implementing cursor's Change event like this:
void cursor1_Change(object sender,
Should work fine but e.ValueIndex is always zero. I'll add this issue to the defect list to be investigated.
Thanks for the example project.
Yes, this is quite a strange known issue for which we haven't found a solution so far. You can solve this problem setting cursor's XValue again after setting YValue, for example:1: Notice that on startup it sets the cursor position to 10,10
cursor1.XValue = 10;
cursor1.YValue = 10;
However you can see that one of the cursors stays at 0.
Code: Select all
cursor1.XValue = 10;
cursor1.YValue = 10;
cursor1.XValue = 10;
2: The text boxes show the cursor positions and you can see that the cursors Z position isnt changing.
This is because CursorTool is not designed for X,Y and Z series. However, I think implementing cursor's Change event like this:
void cursor1_Change(object sender,
Code: Select all
Steema.TeeChart.Tools.CursorChangeEventArgs e) {
double diff;
xTB.Text = contour1.XValues[cursor1.NearestPoint(Steema.TeeChart.Tools.CursorToolStyles.Both, out diff)].ToString();
//zTB.Text = contour1.ZValues[cursor1.NearestPoint(Steema.TeeChart.Tools.CursorToolStyles.Both, out diff)].ToString();
zTB.Text = contour1.ZValues[e.ValueIndex].ToString();
yTB.Text = contour1.YValues[cursor1.NearestPoint(Steema.TeeChart.Tools.CursorToolStyles.Both, out diff)].ToString();
}
You can do this:I would also like to use the FastCursor option, but how do I change what colour the cursor lines are?
Code: Select all
cursor1.FastCursor = true;
cursor1.Pen.Color = Color.Red;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Also the colour changing on the fastCursor doesnt seem to work for me.
I have uploaded a new example called fullExample to show more fully what I am trying to do.
I am building a custom control with a contour and two other charts which will eventually display slices from the contour data at the cursor position.
The data is X - Time, Y - DeltaOD, Z - Wavelength.
I need to use the cursor to pick a paticular point on the contour and then display "slices" of the data in the side and bottom charts based on the cursor position.
So my two problems are the Z-axis cursor and the fast cursor option not letting me keep the cursor colour black.
Hope you can help!
Dave
I have uploaded a new example called fullExample to show more fully what I am trying to do.
I am building a custom control with a contour and two other charts which will eventually display slices from the contour data at the cursor position.
The data is X - Time, Y - DeltaOD, Z - Wavelength.
I need to use the cursor to pick a paticular point on the contour and then display "slices" of the data in the side and bottom charts based on the cursor position.
So my two problems are the Z-axis cursor and the fast cursor option not letting me keep the cursor colour black.
Hope you can help!
Dave
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Dave,
As a workaround you can try combining CursorTool and MouseMove event, for example:
Not that I can think of at the moment.Is there no way to get the cursor working at the moment on a contour?
I'm not able to give you an estimate date at the present moment. I recommend you to be aware at this forum or subscribe to our RSS news feed for new release announcements and what's being fixed and implemented on them.If not how quickly can we expect a fix as being able to use it is a hard requirement of the project I am working on?
As a workaround you can try combining CursorTool and MouseMove event, for example:
Code: Select all
void tChart1_MouseMove(object sender, MouseEventArgs e)
{
index = contour1.Clicked(e.X, e.Y);
this.Text = index.ToString();
if (index != -1)
{
zTB.Text = contour1.ZValues[index].ToString();
}
}
void cursor1_Change(object sender, Steema.TeeChart.Tools.CursorChangeEventArgs e) {
double diff;
xTB.Text = contour1.XValues[cursor1.NearestPoint(Steema.TeeChart.Tools.CursorToolStyles.Both, out diff)].ToString();
//zTB.Text = contour1.ZValues[cursor1.NearestPoint(Steema.TeeChart.Tools.CursorToolStyles.Both, out diff)].ToString();
yTB.Text = contour1.YValues[cursor1.NearestPoint(Steema.TeeChart.Tools.CursorToolStyles.Both, out diff)].ToString();
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Dave,
This is because of your chart's background color. When set to FastCursor=true, CursorTool calculates its Pen color like this:
And then it's plotted this way:
Therefore, in your particular chart it can not be black. You'll see a black cursor if you add 2 lines below in ContourMap's constructor just after the call to InitializeComponent.
Sorry, I missed that one.What about the cursor colour problem illustrated in the fullExample.zip file?
This is because of your chart's background color. When set to FastCursor=true, CursorTool calculates its Pen color like this:
Code: Select all
penXOR = -1 ^ Pen.Color.ToArgb();
Code: Select all
ControlPaint.DrawReversibleLine(start, end, Color.FromArgb(penXOR));
Code: Select all
mainChart.Clear();
mainChart.Aspect.View3D = false;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Dave,
Yes, I tried that code. Ok, I may have been a little bit drastic .
In that case you can do something like this:
Yes, I tried that code. Ok, I may have been a little bit drastic .
In that case you can do something like this:
Code: Select all
mainChart.Walls.Back.Gradient.Visible = false;
mainChart.Walls.Back.Color = Color.LightGray;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |