Individual mark text format problem

TeeChart for ActiveX, COM and ASP
Post Reply
Rover
Newbie
Newbie
Posts: 12
Joined: Thu Jun 22, 2006 12:00 am

Individual mark text format problem

Post by Rover » Fri Dec 07, 2007 2:46 pm

Hi,

I use v8 activeX and try set set individual mark text formats to a gantt chart series. This leads to a very annoying effect: when setting one mark text font to bold, a lot (not all) martktext lose their transparency and change their font size. From now on, settings in the teechart commander on series level (eg. font / fontsize / transparency) have no effect any more. Unless I clear the series and populate it again the only way to manipulate the marktext of the series is to set each individually. One should think, that setting an individual mark text can be overridden by setting mark text properties one series level and that changing one mark text property doesn't affect other properties of the mark text.

code example :

Code: Select all

tc.Series(SI.ag).Marks.Item(Aufgenommen).Font.Bold = True
Please help. I can provide no sample as my program shows customer data...

Kind regards


Jan

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

Post by Narcís » Fri Dec 07, 2007 3:46 pm

Hi Jan,

Thanks for reporting this. I have been able to reproduce the issue here and added it (TV52012630) to our defect list to be fixed for future releases.
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

Rover
Newbie
Newbie
Posts: 12
Joined: Thu Jun 22, 2006 12:00 am

Post by Rover » Tue Dec 11, 2007 4:07 pm

Hi Narcis,

can you tell me when it will be fixed? Could you send me a patch or workaround? I am really in need of this error to be fixed, as I use it in production environment.

Kind regards,

Jan

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 Dec 11, 2007 6:34 pm

Hi Jan,

At the moment I can't give you a date of when this will be fixed. However, a workaround is replacing series marks by annotation tools, something like this:

Code: Select all

Private Sub Form_Load()
    TChart1.Aspect.View3D = False
    
    TChart1.AddSeries scGantt
    
    TChart1.Series(0).FillSampleValues 10
    TChart1.Series(0).Marks.Visible = True
    
    TChart1.Environment.InternalRepaint
    
    For i = 0 To TChart1.Series(0).Count - 1
        TChart1.Tools.Add tcAnnotate
        
        TChart1.Tools.Items(i).asAnnotation.Text = TChart1.Series(0).PointLabel(i)
        TChart1.Tools.Items(i).asAnnotation.Shape.CustomPosition = True
        TChart1.Tools.Items(i).asAnnotation.Shape.Left = TChart1.Series(0).Marks.Positions.Position(i).LeftTop.X
        TChart1.Tools.Items(i).asAnnotation.Shape.Top = TChart1.Series(0).Marks.Positions.Position(i).LeftTop.Y
    Next i
    
    TChart1.Series(0).Marks.Visible = False
    
    TChart1.Tools.Items(5).asAnnotation.Shape.Font.Bold = True
End Sub
Hope this helps!
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

Rover
Newbie
Newbie
Posts: 12
Joined: Thu Jun 22, 2006 12:00 am

Post by Rover » Tue Dec 11, 2007 6:41 pm

Hi Narcís,

I'll try that, although I'm a bit skeptical concerning the performance...
I use the tchart at an resolution of 8400*3150 pixels to do our production planning and I guess this is challenging in terms of performance.

Nevertheless thanks for your fast reply.

Jan

Rover
Newbie
Newbie
Posts: 12
Joined: Thu Jun 22, 2006 12:00 am

Post by Rover » Tue Dec 11, 2007 6:54 pm

Ouch! :cry:

I just implemented your suggestion, but now I am stuck with the problem, that the labels stay fixed to their position when I zoom or scroll....

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 Dec 11, 2007 7:24 pm

Hi Jan,

In that case you need to set the annotation tools position relative to some element in the chart, for example:

Code: Select all

Private Sub Form_Load()
    TChart1.Aspect.View3D = False
    TChart1.Legend.Visible = False
   
    TChart1.AddSeries scGantt
    TChart1.Series(0).FillSampleValues 10
End Sub

Private Sub TChart1_OnBeforeDrawAxes()
    TChart1.Tools.Clear
    
    For i = 0 To TChart1.Series(0).Count - 1
        TChart1.Tools.Add tcAnnotate
       
        TChart1.Tools.Items(i).asAnnotation.Text = TChart1.Series(0).PointLabel(i)
        TChart1.Tools.Items(i).asAnnotation.Shape.CustomPosition = True
        
        Dim tmp As Integer
        tmp = TChart1.Series(0).CalcXPosValue(TChart1.Series(0).asGantt.EndValues.Value(i)) - TChart1.Series(0).CalcXPosValue(TChart1.Series(0).asGantt.StartValues.Value(i))
        
        TChart1.Tools.Items(i).asAnnotation.Shape.Left = TChart1.Series(0).CalcXPosValue(TChart1.Series(0).asGantt.StartValues.Value(i)) + tmp / 2
        TChart1.Tools.Items(i).asAnnotation.Shape.Top = TChart1.Series(0).CalcYPos(i) - TChart1.Series(0).asGantt.Pointer.HorizontalSize
    Next i
   
    TChart1.Tools.Items(5).asAnnotation.Shape.Font.Bold = True
End Sub
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

Rover
Newbie
Newbie
Posts: 12
Joined: Thu Jun 22, 2006 12:00 am

Post by Rover » Tue Dec 11, 2007 7:36 pm

:|
Well.. as each the annotation tools prevent most tasks from beeing clicked and all have to be set individually - I guess this is not an applicable solution.
I hope it gets fixed soon...

Kind regards,

Jan

Post Reply