Jump to content
Software FX Community

Multiple panes


User (Legacy)

Recommended Posts

I am trying to create three or more panes on a chart. I can create the panes

ok but i am having trouble assigning as series to the new axis. An example

is attached and my code is...

With StdChart1

' Do multiple panes, if required

If mShowData = "Multiple Charts, Single Series" And mChartData.Length > 1

Then

.Series(0).YAxis = SoftwareFX.ChartFX.YAxis.Main

.AxisY.Pane = 0

For i As Integer = 1 To mChartData.Length - 1

If i = 1 Then

.AxisY2.Pane = i

.Series(i).YAxis = SoftwareFX.ChartFX.YAxis.Secondary

Else

.Axis(i + 2).Pane = i

.Axis(i + 2).YAxis = True

.Series(i).YAxis = SoftwareFX.ChartFX.YAxis.Main

End If

Next

End If

.AxisY2.Position = SoftwareFX.ChartFX.AxisPosition.Near

.DataSourceSettings.DataSource = DT

End With

Link to comment
Share on other sites

I think the problem is this:

.Series(i).YAxis = SoftwareFX.ChartFX.YAxis.Main

You realize that you are assigning all of these series to the main Y axis ?

I think what you wanted here was:

.Series(i).YAxis = (SoftwareFX.ChartFX.YAxis) (i+2);

FP

Software FX Support

"MGH" <MGH@mgh.com> wrote in message news:S%232LT%23v2DHA.3008@WEBSERVER1...

> I am trying to create three or more panes on a chart. I can create the

panes

> ok but i am having trouble assigning as series to the new axis. An example

> is attached and my code is...

>

> With StdChart1

> ' Do multiple panes, if required

> If mShowData = "Multiple Charts, Single Series" And mChartData.Length > 1

> Then

> .Series(0).YAxis = SoftwareFX.ChartFX.YAxis.Main

> .AxisY.Pane = 0

> For i As Integer = 1 To mChartData.Length - 1

> If i = 1 Then

> .AxisY2.Pane = i

> .Series(i).YAxis = SoftwareFX.ChartFX.YAxis.Secondary

> Else

> .Axis(i + 2).Pane = i

> .Axis(i + 2).YAxis = True

> .Series(i).YAxis = SoftwareFX.ChartFX.YAxis.Main

> End If

> Next

> End If

> .AxisY2.Position = SoftwareFX.ChartFX.AxisPosition.Near

> .DataSourceSettings.DataSource = DT

> End With

>

>

>

post-2107-13922378374509_thumb.jpg

Link to comment
Share on other sites

Don't worry

.Series(i).YAxis = CType(i + 2, SoftwareFX.ChartFX.YAxis)

does the trick.

"MGH" <MGH@mgh.com> wrote in message news:S%232LT%23v2DHA.3008@WEBSERVER1...

> I am trying to create three or more panes on a chart. I can create the

panes

> ok but i am having trouble assigning as series to the new axis. An example

> is attached and my code is...

>

> With StdChart1

> ' Do multiple panes, if required

> If mShowData = "Multiple Charts, Single Series" And mChartData.Length > 1

> Then

> .Series(0).YAxis = SoftwareFX.ChartFX.YAxis.Main

> .AxisY.Pane = 0

> For i As Integer = 1 To mChartData.Length - 1

> If i = 1 Then

> .AxisY2.Pane = i

> .Series(i).YAxis = SoftwareFX.ChartFX.YAxis.Secondary

> Else

> .Axis(i + 2).Pane = i

> .Axis(i + 2).YAxis = True

> .Series(i).YAxis = SoftwareFX.ChartFX.YAxis.Main

> End If

> Next

> End If

> .AxisY2.Position = SoftwareFX.ChartFX.AxisPosition.Near

> .DataSourceSettings.DataSource = DT

> End With

>

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...