Hi,
I think this is not possible but I ask the question anyway. I have two series stacked. I created the tcMarksTip tool and the marks on the top are visible. I would like to display two diffetent values on the each marks (on tcMarksTip tool = value, on marks = total of two series). Is it possible to do something like that ?
Thank you
MaksTip
Re: MaksTip
Hi Rousseau,
Yes, if I understand well this example is doing what you are trying to achieve:
Yes, if I understand well this example is doing what you are trying to achieve:
Code: Select all
Private Sub Form_Load()
TChart1.AddSeries scBar
TChart1.AddSeries scBar
TChart1.Series(0).Add 3, "", clTeeColor
TChart1.Series(0).Add 5, "", clTeeColor
TChart1.Series(0).Marks.Visible = False
TChart1.Series(1).Add 4, "", clTeeColor
TChart1.Series(1).Add 8, "", clTeeColor
TChart1.Series(0).asBar.MultiBar = mbStacked
TChart1.Tools.Add tcMarksTip
RecalcTotals
End Sub
Private Sub RecalcTotals()
Dim SeriesIndex, ValueIndex As Integer
Dim total As Double
For ValueIndex = 0 To TChart1.Series(0).Count - 1
total = 0
For SeriesIndex = 0 To TChart1.SeriesCount - 1
total = total + TChart1.Series(SeriesIndex).YValues.Value(ValueIndex)
Next SeriesIndex
TChart1.Series(TChart1.SeriesCount - 1).PointLabel(ValueIndex) = Str$(total)
Next ValueIndex
End Sub
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 31
- Joined: Fri Oct 13, 2006 12:00 am
- Location: St-Jean-Port-Joli, Canada
- Contact:
Re: MaksTip
Hi Yeray,
It's not exactly what I'm trying to do.
There are some screenshot.
Before to call RecalcTotals. After to call RecalcTotals.
The values display with the tcMarksTip change for the total. I try to display each values ( Value of serie(0), Value of serie(1), total of two series).
It's not exactly what I'm trying to do.
There are some screenshot.
Before to call RecalcTotals. After to call RecalcTotals.
The values display with the tcMarksTip change for the total. I try to display each values ( Value of serie(0), Value of serie(1), total of two series).
Re: MaksTip
Hi Rousseau,
Excuse me, I forgot one line at Form_Load method, after adding the MarksTip tool:
Excuse me, I forgot one line at Form_Load method, after adding the MarksTip tool:
Code: Select all
TChart1.Tools.Items(0).asMarksTip.Style = smsValue
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 31
- Joined: Fri Oct 13, 2006 12:00 am
- Location: St-Jean-Port-Joli, Canada
- Contact:
Re: MaksTip
thanks, that's work exactly as I wanted.