User (Legacy) Posted January 14, 2004 Report Share Posted January 14, 2004 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 More sharing options...
Software FX Posted January 14, 2004 Report Share Posted January 14, 2004 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 > > > Link to comment Share on other sites More sharing options...
User (Legacy) Posted January 15, 2004 Author Report Share Posted January 15, 2004 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.