Hello,
could you please explain how to add the AxTeeCommander to a project?
The demo says:
Private Sub Form_Load()
TeeCommander1.Chart = TChart1
End Sub
Changing this into
AxTeeCommander1.chart = AxTChart1
works - except that the whole commandbar isn't accessible. Not accessible means that it is drawn, but greyed out.
Next question:
Demo also says for custom commander:
Private Sub Form_Load()
TeeCommander1.Chart = TChart1
TeeCommander1.Controls = Array(tcbRotate, _
tcbSeparator, _
tcbZoom, _
tcbSeparator, _
tcbEdit)
End Sub
The ".controls = Array(tcbRotate, ... )" command doesn't work with AxTeeCommander, how can I solve this problem? First I thougt that it may could be the AddRange method, but I can't get it to work neither
Any advice on this?
Regards,
Mark
Problems with AxTeeCommander
Hi Mark,
int[] customButtons=new int[3];
customButtons[0]=(int)TeeChart.ETeeCommanderControls.tcbEdit;
customButtons[1]=(int)TeeChart.ETeeCommanderControls.tcbRotate;
customButtons[2]=(int)TeeChart.ETeeCommanderControls.tcbMove;
axTeeCommander1.Buttons=customButtons;
if you're using the AcitveX version with VS.Net should work using :could you please explain how to add the AxTeeCommander to a project?
Code: Select all
axTeeCommander1.ChartLink = axTChart1.ChartLink;
You should use :The ".controls = Array(tcbRotate, ... )" command doesn't work with AxTeeCommander, how can I solve this problem? First I thougt that it may could be the AddRange method, but I can't get it to work neither
int[] customButtons=new int[3];
customButtons[0]=(int)TeeChart.ETeeCommanderControls.tcbEdit;
customButtons[1]=(int)TeeChart.ETeeCommanderControls.tcbRotate;
customButtons[2]=(int)TeeChart.ETeeCommanderControls.tcbMove;
axTeeCommander1.Buttons=customButtons;
Pep Jorge
http://support.steema.com
http://support.steema.com
Hello,
the problem still exists. After reconfiguring a chart with the AxTeeCommander the onClickSeries Event doesn't seem to work. Is this a known bug?
Mark
/edit: ok, the problem exists if you set the values on your own, too. Is there any way to avoid this behavior?
It seems that there are 2 settings which cause the event not to work, these are opengl and the orthogonal setting.
the problem still exists. After reconfiguring a chart with the AxTeeCommander the onClickSeries Event doesn't seem to work. Is this a known bug?
Mark
/edit: ok, the problem exists if you set the values on your own, too. Is there any way to avoid this behavior?
It seems that there are 2 settings which cause the event not to work, these are opengl and the orthogonal setting.
Hi,
It works fine here , without using OpenGL. Does it works fine for you ?the problem still exists. After reconfiguring a chart with the AxTeeCommander the onClickSeries Event doesn't seem to work. Is this a known bug?
Setting OpenGL to true makes the OnClickSeries event to not work, this is by default (missing feature)./edit: ok, the problem exists if you set the values on your own, too. Is there any way to avoid this behavior?
It seems that there are 2 settings which cause the event not to work, these are opengl and the orthogonal setting.
Pep Jorge
http://support.steema.com
http://support.steema.com
Hi Pep,
thank you for the answer.
Here's a short sample code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim x As Integer
For x = 1 To 5
AxTChart1.CloneSeries(0)
Next x
AxTeeCommander1.ChartLink = AxTChart1.ChartLink
Call Wasserfall_Darstellung()
End Sub
Private Sub AxTChart1_OnClickSeries(ByVal sender As Object, ByVal e As AxTeeChart.ITChartEvents_OnClickSeriesEvent) Handles AxTChart1.OnClickSeries
MsgBox("click")
End Sub
Private Sub Wasserfall_Darstellung()
Dim x As Integer
For x = 0 To 4
AxTChart1.Series(x).asFastLine.DrawAllPoints = True
AxTChart1.Series(x).FillSampleValues(20)
Next
With AxTChart1.Aspect
.Chart3DPercent = 56
.Zoom = 85
.Rotation = 335
.Perspective = 33
.HorizOffset = 32
.VertOffset = 5
'.Orthogonal = False
End With
End Sub
After making changes with the commander, the onClickSeries event doesn't work any more. To avoid this I tried to set the values myself, but if you use ".Orthogonal = False" - which is necessary imho - it doesn't work either.
thank you for the answer.
No it doesn't See belowIt works fine here , without using OpenGL. Does it works fine for you ?
Ok, good to know (I already thought so). But it neither works when changing the settings via the AxTeeCommander, nor when we use the orthogonal value instead.Setting OpenGL to true makes the OnClickSeries event to not work, this is by default (missing feature).
Here's a short sample code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim x As Integer
For x = 1 To 5
AxTChart1.CloneSeries(0)
Next x
AxTeeCommander1.ChartLink = AxTChart1.ChartLink
Call Wasserfall_Darstellung()
End Sub
Private Sub AxTChart1_OnClickSeries(ByVal sender As Object, ByVal e As AxTeeChart.ITChartEvents_OnClickSeriesEvent) Handles AxTChart1.OnClickSeries
MsgBox("click")
End Sub
Private Sub Wasserfall_Darstellung()
Dim x As Integer
For x = 0 To 4
AxTChart1.Series(x).asFastLine.DrawAllPoints = True
AxTChart1.Series(x).FillSampleValues(20)
Next
With AxTChart1.Aspect
.Chart3DPercent = 56
.Zoom = 85
.Rotation = 335
.Perspective = 33
.HorizOffset = 32
.VertOffset = 5
'.Orthogonal = False
End With
End Sub
After making changes with the commander, the onClickSeries event doesn't work any more. To avoid this I tried to set the values myself, but if you use ".Orthogonal = False" - which is necessary imho - it doesn't work either.
Hi,
Yes, you're correct. For some extreme 3D parameters the internal 3d->2d->3d transformation is not fully correct and you end up with wrong results (Series clicked is not found). For in most cases the Clicked method returns correct index even if chart is in 3d.
Yes, you're correct. For some extreme 3D parameters the internal 3d->2d->3d transformation is not fully correct and you end up with wrong results (Series clicked is not found). For in most cases the Clicked method returns correct index even if chart is in 3d.
Pep Jorge
http://support.steema.com
http://support.steema.com
OK, thanks for the confirmation, very bad to hear that
So, now we have to find another way to solve this problem. After some research i stepped on the onClickLegend Event, but - as always - the example code provided doesn't work with VB and AxTChart
Could you be so kind and help me out with this?
I've found AxTChart1.Series(0).LegendToValueIndex(0), is this the right way?
Best regards,
Mark
So, now we have to find another way to solve this problem. After some research i stepped on the onClickLegend Event, but - as always - the example code provided doesn't work with VB and AxTChart
Could you be so kind and help me out with this?
I've found AxTChart1.Series(0).LegendToValueIndex(0), is this the right way?
Best regards,
Mark
Hi Mark,
I've found AxTChart1.Series(0).LegendToValueIndex(0), is this the right way?
Sorry, most of the demos provided in the ActiveX version has been created with VB, VC++, etc.. But these can be translated.So, now we have to find another way to solve this problem. After some research i stepped on the onClickLegend Event, but - as always - the example code provided doesn't work with VB and AxTChart
Yes, of course.Could you be so kind and help me out with this?
Yes, you could use similar code like the following example (VB code), but in the OnClickLegend event. If you need help to translate it please let us know.I've found AxTChart1.Series(0).LegendToValueIndex(0), is this the right way?
Code: Select all
Private Sub TChart1_OnMouseMove(ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
Dim tmp, tmpL As Integer
With TChart1
If .Series(0).Clicked(X, Y) <> -1 And OnSeriesPoint = False Then
.Canvas.Brush.Style = bsSolid
.Canvas.Pen.Color = vbBlack
.Canvas.Brush.Color = vbWhite
.Canvas.TextOut X + 10, Y, TChart1.Axis.Bottom.Labels.FormattedValue(.Series(0).XScreenToValue(X)) _
& ", " & Str$(TChart1.Axis.Left.Labels.FormattedValue(.Series(0).YScreenToValue(Y)))
OnSeriesPoint = True
End If
'Repaint Chart to clear Textoutputted Mark
If .Series(0).Clicked(X, Y) = -1 And OnSeriesPoint = True Then
OnSeriesPoint = False
.Repaint
End If
tmpL = TChart1.Legend.Clicked(X, Y)
If tmpL <> -1 And ((tmpL <> tmpL2) Or (OnLegendPoint = False)) Then
.Repaint
.Canvas.Brush.Color = .Series(0).LegendItemColor(tmpL)
.Canvas.Rectangle X, Y, X + 20, Y + 20
.Canvas.Brush.Color = vbWhite
.Canvas.TextOut X + 7, Y + 7, Str$(.Series(0).YValues.Value(.Series(0).LegendToValueIndex(tmpL))) & " "
tmpL2 = tmpL
OnLegendPoint = True
End If
If .Legend.Clicked(X, Y) = -1 And OnLegendPoint = True Then
OnLegendPoint = False
.Repaint
End If
End With
I've found AxTChart1.Series(0).LegendToValueIndex(0), is this the right way?
Pep Jorge
http://support.steema.com
http://support.steema.com