Simple Question, (New User)

H

Hazem

I am trying to use OWC10 for the first time I hope you have the time to help
me out or at least direct me to a web site that might have full documentation.

I am simply trying to plot two function Y=x and Y=x^2 on the same chart.
Here is what I have so far, the name of the form is Quench and the name of
the control on the form is AxChart2

Dim Y1(10) As Double
Dim X1(10) As Double
Dim Y2(10) As Double
Dim X2(10) As Double

For J = 1 To 10
X1(J) = J
Y1(J) = J
X2(J) = J
Y2(J) = J ^ 2
Next
Quench.AxChart2.Visible = True
Quench.AxChart2.Charts.Add(0)
Quench.AxChart2.HasChartSpaceLegend = True
Quench.AxChart2.Charts(0).Type =
OWC10.ChartChartTypeEnum.chChartTypeScatterSmoothLineMarkers
Quench.AxChart2.HasChartSpaceTitle = True
Quench.AxChart2.ChartSpaceTitle.Caption = "Quench Tower Cooling Curve"
Quench.AxChart2.Charts(0).Axes(0).HasTitle = True
Quench.AxChart2.Charts(0).Axes(1).HasTitle = True
Quench.AxChart2.Charts(0).Axes(0).Title.Caption = "Temperature"
Quench.AxChart2.Charts(0).Axes(1).Title.Caption = "Heat Duty"
Quench.AxChart2.Charts(0).SetData(OWC10.ChartDimensionsEnum.chDimSeriesNames, -1, "Cooling Curve")

‘ How Do I plot Y1 vs X1 and Y2 vs X2 everything I tried gave errors or did
not work

Thanks in advance
Hazem
 
A

Alvin Bruney [MVP]

"Selected". Can I get whatever is selected to show that it is being
selected
on the chart?
yes, just use the selected function of the object in question
Dim Y(10) as Double ' DOES NOT WORK. The chart gives a dimension error
Dim Y(10) ' This one works

What should Y be dimensioned as?

If I insist on keeping Y as double, is there anything I can change in the
following sentence to get it to work?
I'm not fully sure i understand what you are asking. chDataLiteral supports
literal data which is interpreted as a string
so your double is viewed as a string not a double. Did i follow your
question???

--
Regards,
Alvin Bruney

Coming this month
The Microsoft Office Web Components Black Book with .NET
http://tinyurl.com/27cok
Hazem said:
Yes Alvin I got it to plot exactly what I want but I still have some
unanswered questions. For example:

Dim Y(10) as Double ' DOES NOT WORK. The chart gives a dimension error
Dim Y(10) ' This one works

What should Y be dimensioned as?

If I insist on keeping Y as double, is there anything I can change in the
following sentence to get it to work?

Quench.AxChart2.Charts(0).SeriesCollection(0).SetData(chConstants.chDimYValues,
chConstants.chDataLiteral, Y)

The last question involves allowing the user to customize the chart. If
the
user right click the mouse button and selects "Commands & Options", a
dialog
box will appear. This is great. If the user clicks the Y-Axis for
example,
the contents of the dialog box will change to reflects options available
for
the Y-Axis BUT BUT BUT, the Y-axis on the chart does not show that it is
"Selected". Can I get whatever is selected to show that it is being
selected
on the chart?

And last but not least, Printing the chart. How do I print?

Best Regards
Hazem

Alvin Bruney said:
did you figure this out? still need help?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Hazem said:
I am trying to use OWC10 for the first time I hope you have the time to
help
me out or at least direct me to a web site that might have full
documentation.

I am simply trying to plot two function Y=x and Y=x^2 on the same
chart.
Here is what I have so far, the name of the form is Quench and the name
of
the control on the form is AxChart2

Dim Y1(10) As Double
Dim X1(10) As Double
Dim Y2(10) As Double
Dim X2(10) As Double

For J = 1 To 10
X1(J) = J
Y1(J) = J
X2(J) = J
Y2(J) = J ^ 2
Next
Quench.AxChart2.Visible = True
Quench.AxChart2.Charts.Add(0)
Quench.AxChart2.HasChartSpaceLegend = True
Quench.AxChart2.Charts(0).Type =
OWC10.ChartChartTypeEnum.chChartTypeScatterSmoothLineMarkers
Quench.AxChart2.HasChartSpaceTitle = True
Quench.AxChart2.ChartSpaceTitle.Caption = "Quench Tower Cooling Curve"
Quench.AxChart2.Charts(0).Axes(0).HasTitle = True
Quench.AxChart2.Charts(0).Axes(1).HasTitle = True
Quench.AxChart2.Charts(0).Axes(0).Title.Caption = "Temperature"
Quench.AxChart2.Charts(0).Axes(1).Title.Caption = "Heat Duty"
Quench.AxChart2.Charts(0).SetData(OWC10.ChartDimensionsEnum.chDimSeriesNames,
-1, "Cooling Curve")

' How Do I plot Y1 vs X1 and Y2 vs X2 everything I tried gave errors or
did
not work

Thanks in advance
Hazem
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top