Page 1 of 1
Individual mark text format problem
Posted: Fri Dec 07, 2007 2:46 pm
by 9531657
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
Posted: Fri Dec 07, 2007 3:46 pm
by narcis
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.
Posted: Tue Dec 11, 2007 4:07 pm
by 9531657
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
Posted: Tue Dec 11, 2007 6:34 pm
by narcis
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!
Posted: Tue Dec 11, 2007 6:41 pm
by 9531657
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
Posted: Tue Dec 11, 2007 6:54 pm
by 9531657
Ouch!
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....
Posted: Tue Dec 11, 2007 7:24 pm
by narcis
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
Posted: Tue Dec 11, 2007 7:36 pm
by 9531657
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