Hello,
What is the best way for adding box with custom data to chart?
I have legend on the right side of chart and would like to have another
box under it.
I tried Rectangle Tool - but looks like it is not possible to define
its position from upper right corner, only from upper left.(It is needed to define position from upper right corner for me because I use chart on website with flexible size - it fits browser's window size)
(I use TeeChart Pro AX v7)
I also tried to add annotation tool, but I have already used annotation and can't
add another one.
pls, could you help me?
thanks
custom Legend-like box
Hi adenin,
It's strange, you should be able to use more than one annotation tool in the same chart. Here you have an example of how you could use several annotation tools and several rectangle tools aligned with the legend.
It's strange, you should be able to use more than one annotation tool in the same chart. Here you have an example of how you could use several annotation tools and several rectangle tools aligned with the legend.
Code: Select all
Private Sub Form_Load()
Dim i As Integer
TChart1.AddSeries scLine
TChart1.Series(0).FillSampleValues 10
TChart1.Panel.MarginRight = 4
TChart1.Environment.InternalRepaint
For i = 0 To 4
TChart1.Tools.Add tcAnnotate
With TChart1.Tools.Items(i).asAnnotation
.Text = Str$(i + 1) + ". ANNOTATION"
.Left = TChart1.Legend.Left
.Top = TChart1.Legend.ShapeBounds.Bottom + 20 + (i * 25)
End With
Next i
For i = 5 To 9
TChart1.Tools.Add tcRectangle
With TChart1.Tools.Items(i).asRectangle
.Text = Str$(i - 4) + ". RECTANGLE"
.Left = TChart1.Legend.Left
.Top = TChart1.Legend.ShapeBounds.Bottom + 20 + (i * 25)
.Height = 20
.Width = 85
End With
Next i
End Sub
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |