Jump to content
Software FX Community

Multiple pane question


User (Legacy)

Recommended Posts

Posted

I'm new to ChartFx,and I'm trying to add some series to 2 different panes, 

unfortunately help it is not clear so i'm not able to get it done.

What I'd like to have is serie #2 on 2nd pane, any hint?

Here's the code...

chart1.Series[0].YAxis=SoftwareFX.ChartFX.YAxis.Main;

chart1.AxisY.Pane=0;

chart1.Series[1].YAxisSoftwareFX.ChartFX.YAxis.Secondary;

chart1.AxisY.Pane=1;

chart1.Series[2].YAxis=SoftwareFX.ChartFX.YAxis.Main;

chart1.AxisY.Pane=0;

chart1.OpenData(SoftwareFX.ChartFX.COD.Values,2,100);

Random rnd=new Random(DateTime.Now.Second);

for(int serie=0;serie<3;serie++)

{

for(int point=0;point<100;point++)

{

chart1.Value[serie,point]=rnd.Next(100);

}

}

chart1.CloseData(SoftwareFX.ChartFX.COD.Values);

Thanks

--

Corrado Cavalli [Microsoft .NET MVP-MCP]

UGIdotNET - http://www.ugidotnet.org

Weblog: http://www.ugidotnet.org/710.blog

Posted

You need to change the line:

chart1.AxisY.Pane=1;

to:

chart1.AxisY2.Pane=1;

As a property chart1.AxisY will keep only the last value to you assign to

it. The way to move series to different panes is to assign the Pane property

of the axis to which the series is associated with.

--

FP

Software FX

Posted

SoftwareFX Support wrote:

> You need to change the line:

>

> chart1.AxisY.Pane=1;

>

> to:

>

> chart1.AxisY2.Pane=1;

>

> As a property chart1.AxisY will keep only the last value to you

> assign to it. The way to move series to different panes is to assign

> the Pane property of the axis to which the series is associated with.

Thanks for the answer but it is still unclear to me how pane work, it is ok

if i have 2 panels with Main and Secondary but how can i have chart 1 and 3

on main pane and 2nd on 2nd pane with all charts using tha Main axis or,

better, what if I have 3 charts and i want each one on its own panel all

using Main YAxis?

chart1.Series[0].YAxis=SoftwareFX.ChartFX.YAxis.Main;

chart1.AxisY.Pane=0;

chart1.Series[1].YAxis=(SoftwareFX.ChartFX.YAxis).Main; //*

chart1.AxisY.Pane=1; //*

chart1.Series[2].YAxis=SoftwareFX.ChartFX.YAxis.Main;

chart1.AxisY.Pane=0;

Replacing * with

chart1.Series[1].YAxis=SoftwareFX.ChartFX.YAxis.Secondary;

chart1.AxisY2.Pane=1;

It, of course, works

Thanks

--

Corrado Cavalli [Microsoft .NET MVP-MCP]

UGIdotNET - http://www.ugidotnet.org

Weblog: http://www.ugidotnet.org/710.blog

Posted

You can add as many axis as you one, you are not limited to Main and

Secondary Y-Axis. These are just there as "macros".

You can do:

chart1.Series[1].YAxis=4;

chart1.Axis[4].Pane=1;

You can add as many y-axis as you want simply by referencing them from a

series.

Also, you can add as many panes as you want:

The following example adds three panes each containing one series:

chart1.Series[0].YAxis=0;

chart1.Axis[0].Pane=0;

chart1.Series[1].YAxis=2; // 1 Is reserved for X-Axis

chart1.Axis[2].Pane=1;

chart1.Series[2].YAxis=3;

chart1.Axis[3].Pane=2;

--

FP

Software FX, Inc.

Archived

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

×
×
  • Create New...