Page 1 of 1
Series Values on Colorline
Posted: Mon Mar 17, 2008 11:30 am
by 45194
Hey!
I have chart with a few fastline series plotted on it. I am using colorlines on top of it as rulers. But I want the value of each series at ruler's location to be displayed besides the ruler. And as I drag it, or zoom/scroll the curve I want those labels to move with the colorline. Can you please give me an idea on how to best accomplish this?
FYI: I am using Teechart v3 for .NET on Visual C#.
Regards,
Gaurav
Posted: Mon Mar 17, 2008 12:18 pm
by narcis
Hi Gaurav,
You may want to achieve something like in the
All Features\Welcome !\Chart styles\Standard\Line(Strip)\Interpolating line series examle in the features demo, available at TeeChart's program group.
For the labels I recommend you have two options:
1. Custom drawing on TeeChart's canvas in the AfterDraw event:
Code: Select all
private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
g.TextOut(line1.CalcXPos(5),line1.CalcYPos(5),"My Custom Text");
}
This code draws the text at the 5th point in the series.
2. Using an Annotation tool. For examples have a look at
All Features\Welcome !\Tools\Annotation example in TeeChart's features demo.
Posted: Tue Mar 18, 2008 4:33 am
by 45194
Hi Narcís,
Thanks for your reply. I am using the second option suggested by you but the problem is synchronising it to always stay with the colorline. If I zoom or pan the graph, colorline moves as it should but the annotations stay where they are. If I redraw them everytime, it becomes very slow. Is there some event with colorline which I could use to detect the change in its position?
Regards,
Gaurav
Posted: Tue Mar 18, 2008 8:58 am
by narcis
Hi Gaurav,
In that case I think you should refresh annotation tool position in the Zoomed, Scroll and UndoneZoom events.
Hope this helps!
Posted: Thu Mar 20, 2008 5:45 am
by 45194
Hi Narcís,
I have a small problem with using the cursortool as a ruler. I have set FastCursor option to true, because I cant afford to have the entire chart redrawn when the cursor is moved as my chart contains lots of data. But the problem is when the chart window goes out of focus and comes back to focus again for example while switching between programs or while opening up any other window putting chart window in background. In that case I see two lines one of which is at the location where my cursor was positioned last and i can not remove that.
I have tried using the forced redraw by generating a bitmap in the activated event of the parent form, but even that doesn't solve it. Please suggest some solution to this.
Regards,
Gaurav
Posted: Thu Mar 20, 2008 9:52 am
by narcis
Hi Gaurav,
Yes, this is a high-priority item in our defect list (TF02012326) but we haven't found a solution yet. At the moment the only solution available is setting FastCursor to false.
Posted: Thu Mar 20, 2008 11:15 am
by 45194
Hi Narcís,
Are you in a position to give us an approximate idea of the time by which it could be resolved? Any estimate in days, weeks, months or years would be helpful in our internal planning.
Regards,
Gaurav
Posted: Thu Mar 20, 2008 11:38 am
by narcis
Hi Gaurav,
I'm afraid I can't give you an estimate date. The issue has been investigated but we think there's little we can do here
.
I recommend you to be aware at this forum or subscribe to our
RSS feed for new release announcements and what's fixed on them.
Posted: Thu Apr 24, 2008 2:58 pm
by narcis
Hi Gaurav,
You may be intrested in checking out the
new TeeChart for .NET v2 update build that fixes this issue. The fix has also been implemented for the next TeeChart for .NET v3 maintenance release due to be out on early May.