Applying Time Scales

B

bLUE

hi.

I am trying to apply times scales to the X Axis using:

AxChartSpace1.Charts(0).Axes(OWC10.ChartAxisPositionEnum.chAxisPositionCategory).GroupingUnitType
= OWC10.ChartAxisUnitTypeEnum.chAxisUnitMonth
AxChartSpace1.Charts(0).Axes(OWC10.ChartAxisPositionEnum.chAxisPositionCategory).GroupingUnit
= 1

AxChartSpace1.Charts(0).Axes(OWC10.ChartAxisPositionEnum.chAxisPositionCategory).TickLabelUnitType
= OWC10.ChartAxisUnitTypeEnum.chAxisUnitMonth
AxChartSpace1.Charts(0).Axes(OWC10.ChartAxisPositionEnum.chAxisPositionCategory).TickMarkUnitType
= OWC10.ChartAxisUnitTypeEnum.chAxisUnitMonth

but it fails on the first line of the code above: Invalid Parameter

Any ideas?

Thanks
 
T

Thao Moua [ms]

You can only timescale attributes if your chart contains
date data. Otherwise, you'll get a runtime error.

Thao Moua
OWC Webchart Support
 
B

bLUE

hi.

What is the correct format for the date data to be used for setData,
so time scales can be applied. Does the date have to be a string in a
particular format or a date type. I have been using the following:

Dim arrCats As Object() = New Object() {"15/01/03", "15/03/03",
"15/12/03"}
Dim arrVals As Object() = New Object() {100, 120, 128}

Thanks
 
T

Thao Moua [ms]

Your date data looks correct. However, for your data to
be recognized by Webchart, they must follow your date
format in your computer's Regional and Language Options
settings. If your computer date format is dd/mm/yy (as
indicated in your code) then Webchart will parse your
data as date.

Thao Moua
OWC Webchart Support
-----Original Message-----
hi.

What is the correct format for the date data to be used for setData,
so time scales can be applied. Does the date have to be a string in a
particular format or a date type. I have been using the following:

Dim arrCats As Object() = New Object() {"15/01/03", "15/03/03",
"15/12/03"}
Dim arrVals As Object() = New Object() {100, 120, 128}

Thanks


"Thao Moua [ms]" <[email protected]> wrote
in message [email protected]>...
 
B

bLUE

hi.. thanks for that.

I made some progress. My local date settings are: dd/MM/yyyy

my data is:
Dim aCats As Object() = New Object() {"01/01/2003", "15/05/2003",
"31/12/2003"}
Dim aVals As Object() = New Object() {10, 50, 10}

I applied time scales using the code, and it works fine, the correct
data is being plotted, BUT on the chart the date appears in american
format. How can I change this?

Thanks
 
T

Thao Moua [ms]

You can change it in the Regional and Language Options
setting in the Control Panels.

Thao Moua
OWC Webchart Support
-----Original Message-----
hi.. thanks for that.

I made some progress. My local date settings are: dd/MM/yyyy

my data is:
Dim aCats As Object() = New Object() {"01/01/2003", "15/05/2003",
"31/12/2003"}
Dim aVals As Object() = New Object() {10, 50, 10}

I applied time scales using the code, and it works fine, the correct
data is being plotted, BUT on the chart the date appears in american
format. How can I change this?

Thanks

"Thao Moua [ms]" <[email protected]> wrote
in message [email protected]>...
 

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

Similar Threads


Top