Hello! How to express two graph

TeeChart for ActiveX, COM and ASP
Post Reply
rush kim
Newbie
Newbie
Posts: 6
Joined: Fri Jan 24, 2014 12:00 am

Hello! How to express two graph

Post by rush kim » Thu Sep 25, 2014 9:16 pm

Hello~ ^^

I could not find a graph that represents the direction of the wind and wind velocity at the same time an example.

How can i fix this coding.. help me..

Code: Select all

'--------------------------------------------

Chart1.Legend.Visible=true  
  Chart1.Header.Text(0)= tag_no
  Chart1.Header.Font.Color=vbBlack
  Chart1.Header.Font.Bold=True
  Chart1.AddSeries(22)
  
  Chart1.Aspect.View3D=False
  Chart1.Panel.Gradient.Visible=false
  Chart1.Panel.Color=black
  Chart1.Panel.BevelOuter=1
  Chart1.Panel.BevelWidth=2
  Chart1.Axis.Bottom.Labels.Angle=0

if res.bof or res.eof then
else 
j = 1
Do until res.EOF				
				setday = res("sday")
				data2 = res("data2")
				 
Chart1.Series(0).Add data2, setday, clTeeColor    
  
res.MoveNext
j = j + 1

loop
end if  

Response.BinaryWrite (Chart1.Export.asNative.SaveToStream(True))

'---------------------------------------- 

Chart2.Legend.Visible=true  
  Chart2.Header.Text(0)= tag_no
  Chart2.Header.Font.Color=vbBlack
  Chart2.Header.Font.Bold=True
  Chart2.AddSeries(fastline)
  
  Chart2.Aspect.View3D=False
  Chart2.Panel.Gradient.Visible=false
  Chart2.Panel.Color=black
  Chart2.Panel.BevelOuter=1
  Chart2.Panel.BevelWidth=2
  Chart2.Axis.Bottom.Labels.Angle=0

if res2.bof or res2.eof then
else 
j = 1
Do until res2.EOF				
				setday = res2("sday")
				data = res2("data")
				 
Chart2.Series(0).Add data, setday, clTeeColor    
  
res2.MoveNext
j = j + 1

loop
end if  

Response.BinaryWrite (Chart2.Export.asNative.SaveToStream(True))
wind2.jpg
wind2.jpg (355.9 KiB) Viewed 10950 times

Yeray
Site Admin
Site Admin
Posts: 9514
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Hello! How to express two graph

Post by Yeray » Fri Sep 26, 2014 11:05 am

Hello,

I'm not sure to understand what's wrong in the resulting images you attached. Could you please explain what result would you expect?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

rush kim
Newbie
Newbie
Posts: 6
Joined: Fri Jan 24, 2014 12:00 am

Re: Hello! How to express two graph

Post by rush kim » Sat Sep 27, 2014 8:14 pm

Hi~

It's not result image... ^^;;;
it's want results....
and it's only one page source.

above image --- OK
below image ---- do not express

Yeray
Site Admin
Site Admin
Posts: 9514
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Hello! How to express two graph

Post by Yeray » Mon Sep 29, 2014 11:22 am

Hello,

I'm still not sure to understand what exact result would you expect.

I see the first chart seems to draw date times in the horizontal axis of the WindRose series, but I don't know if this is what you'd expect, what are setday and data2, what are they supposed to represent and which one is correctly represented in the image you posted, if any.
And the same for sday and data in the second chart.

Note the XValues in the WindRose represent the angle, and the YValues represent the radius of each point.
So, if you want to add points with angle and value, you should use AddXY. Ie:

Code: Select all

  TChart1.AddSeries scWindRose
  TChart1.Series(0).AddXY 15, 50, "", clTeeColor
  TChart1.Series(0).AddXY 30, 70, "", clTeeColor
  TChart1.Series(0).AddXY 45, 30, "", clTeeColor
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply