Axis break
-
- Newbie
- Posts: 6
- Joined: Fri Nov 15, 2002 12:00 am
- Location: NL
Axis break
Hi,
I want to draw an axis-break in my chart.
Can anyone tell me how?
P.
I want to draw an axis-break in my chart.
Can anyone tell me how?
P.
Hi,
I'm not sure what you refer with "axis-break". Could you please post an image ? Maybe you can use two axis (one with custom axis) ?
I'm not sure what you refer with "axis-break". Could you please post an image ? Maybe you can use two axis (one with custom axis) ?
Pep Jorge
http://support.steema.com
http://support.steema.com
-
- Newbie
- Posts: 6
- Joined: Fri Nov 15, 2002 12:00 am
- Location: NL
Hi,
I think the best way to do this is using the Canvas techniques, you can do something like in the following example :
or using custom axis. You can see some examples of use in the Demo features project included in the TeeChart installation.
I think the best way to do this is using the Canvas techniques, you can do something like in the following example :
Code: Select all
Private Sub Form_Load()
With TChart1
.Aspect.View3D = False
.AddSeries scLine
For i = 0 To 5
.Series(0).AddXY i, Rnd * 100, "", clTeeColor
Next i
.Panel.Color = vbWhite
.Legend.Visible = False
.Axis.Bottom.GridPen.Visible = False
.Axis.Left.GridPen.Visible = False
End With
End Sub
Private Sub TChart1_OnAfterDraw()
With TChart1
.Canvas.Pen.Color = vbWhite
.Canvas.Pen.Width = 5
.Canvas.MoveTo .Axis.Left.Position - 10, .Series(0).CalcYPosValue(50)
.Canvas.LineTo .Axis.Left.Position + 10, .Series(0).CalcYPosValue(55)
End With
End Sub
Pep Jorge
http://support.steema.com
http://support.steema.com
-
- Newbie
- Posts: 6
- Joined: Fri Nov 15, 2002 12:00 am
- Location: NL
-
- Newbie
- Posts: 6
- Joined: Fri Nov 15, 2002 12:00 am
- Location: NL
-
- Newbie
- Posts: 6
- Joined: Fri Nov 15, 2002 12:00 am
- Location: NL
I create the object with CreateObject 'cause the graph is created in a COM DLL.
There OnAfterDraw isn't fired (or isn't hooked) when I call the method TChart.Export.asJPEG.SaveToFile ("test.jpg")
Can you tell me how to hook the event OnAfterDraw to a custom procedure?
In .NET it's much easier. But this is with VB6.
There OnAfterDraw isn't fired (or isn't hooked) when I call the method TChart.Export.asJPEG.SaveToFile ("test.jpg")
Can you tell me how to hook the event OnAfterDraw to a custom procedure?
In .NET it's much easier. But this is with VB6.
Hi,
code from an example AX DLL project could be as follows:
(here: "TCTest.ChartClass1")
======================
======================
The ASP script to call that may look like the following:
======================
======================
code from an example AX DLL project could be as follows:
(here: "TCTest.ChartClass1")
======================
Code: Select all
Private WithEvents m_Chart As TeeChart.TChart
Public Function ReturnChart() As Variant
Set m_Chart = CreateObject("TeeChart.TChart")
m_Chart.AddSeries (0)
Dim t As Integer
m_Chart.Series(0).FillSampleValues(10)
ReturnChart = m_Chart.Export.asPNG.SaveToStream
Set m_Chart = Nothing
End Function
Private Sub m_Chart_OnAfterDraw()
m_Chart.Canvas.TextOut 100, 100, "Hello world"
End Sub
The ASP script to call that may look like the following:
======================
Code: Select all
<%
Function RunChart()
Set Chart1 = CreateObject("TCTest.ChartClass1")
RunChart=Chart1.ReturnChart
Set Chart1=Nothing
End Function
Response.BinaryWrite(RunChart)
%>
Pep Jorge
http://support.steema.com
http://support.steema.com
-
- Newbie
- Posts: 6
- Joined: Fri Nov 15, 2002 12:00 am
- Location: NL