Reposition the TITLE and Expand the LEGEND Box on ZedGraph.

How to Change the position of the TITLE in ZedGraph?
How to Expand the LEGEND Box?

I'm getting data every 10 seconds.
I changed some properties and the graphic is not working.
What is wrong?
If right click on mouse and select Default Scroll or the last option in this popup menu; i see plotting but in normal view don't appear.

            //myPane02m.YAxis.Title.Text = "Particles";                     // Setta como Legenda (Particles) no Eixo Y
            myPane02m.YAxis.MajorGrid.IsVisible = true;                     // Setta Linhas no Eixo Y ou seja na Horizontal.
            myPane02m.YAxis.MajorGrid.DashOff = 5;                          // Seta a Intensidade da Linha no Eixo Y.

            // X AXIS SETTINGS
            myPane02m.XAxis.Title.IsVisible = false;                        // torna o titulo do eixo X off
            myPane02m.YAxis.Title.IsVisible = false;                        // torna o titulo do eixo Y off 
            myPane02m.XAxis.MajorGrid.DashOff = 5;                          // Seta a Intensidade da Linha no Eixo X.
            myPane02m.XAxis.MajorGrid.IsVisible = true;                     // Setta Linhas no Eixo X ou seja na Vertical.
            //myPane02m.XAxis.MajorTic.IsOpposite = false;
            //myPane02m.XAxis.MinorTic.IsAllTics = false;                   // mudei aqui para ver se para de pular o grafico.
            myPane02m.XAxis.Scale.FontSpec.Angle = 0;                       // Setta o Angulo do Scale do Eixo X.
            myPane02m.XAxis.Scale.FontSpec.Family = "Arial, Narrow";        // Setta a Fonte da Scale no Eixo X.
            myPane02m.XAxis.Scale.FontSpec.FontColor = Color.Fuchsia;       // Setta a Cor da Legenda do Dado que Entrara no Eixo X.
            myPane02m.XAxis.Scale.FontSpec.IsBold = true;                   // Setta Negrito na Scale no Eixo X.
            myPane02m.XAxis.Scale.FontSpec.Size = 26;                       // Setta o Tamanho da Fonte da Scale no Eixo X.
            myPane02m.YAxis.Scale.FontSpec.Size = 26;
            //myPane02m.XAxis.Scale.IsSkipCrossLabel = true;
            //myPane02m.XAxis.Scale.IsPreventLabelOverlap = true;
            myPane02m.XAxis.Scale.Min = 0;                                  // We want to use time from now
            myPane02m.XAxis.Scale.Max = 24;                                 // to 5 min per default
            //myPane02m.XAxis.Scale.MinorUnit = DateUnit.Second;              // set the minimum x unit to time/seconds
            //myPane02m.XAxis.Scale.MajorUnit = DateUnit.Minute;              // set the maximum x unit to time/minutes
            myPane02m.Title.Text = "2-7µm" ;
            myPane02m.Title.FontSpec.Size = 30;
            myPane02m.XAxis.Title.FontSpec.FontColor = Color.DarkViolet;    // Setta a Cor do Titulo no Eixo X.
            myPane02m.XAxis.IsVisible = true;
            myPane02m.Legend.FontSpec.Size = 27;
            myPane02m.Legend.Position = LegendPos.Float;
            myPane02m.Legend.Location = new Location(0.98, 0.0, CoordType.PaneFraction, AlignH.Right, AlignV.Top);
            myPane02m.Legend.FontSpec.Size = 19;
            myPane02m.XAxis.Scale.MinorStep = 1;                            // Setta os tracinhos da reta.
            myPane02m.XAxis.Scale.MajorStep = 1;                            // Setta o intervalo do tempo na Scale X.
            myPane02m.XAxis.Scale.MinGrace = 1;
            myPane02m.XAxis.Scale.MaxGrace = 10;
            //myPane02m.Legend.IsHStack = false;

            TickStart = Environment.TickCount;

Open in new window

Who is Participating?
ocaccyAuthor Commented:
xtermie, thank you.

ocaccyAuthor Commented:

I could not solve my problem with the positioning.
I have other problems.
How to save the images generated by Zedgraph as xxx.JPG?
How to save the data that generated the graph as xxx.XML?
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

ocaccyAuthor Commented:
Forgive me.

I do not know VB.

How to transform the code to C #?
b = Button(Text="Save Chart")
def SaveChart():
        import clr
        from System.Windows.Forms import DialogResult, SaveFileDialog
        dialog = SaveFileDialog()
        dialog.Title = 'Save Chart as Jpg Image'
        dialog.Filter = 'Jpg Image (*.jpg)|*.JPG;|All files (*.*)|*.*'
        if dialog.ShowDialog() == DialogResult.OK:
            image.Save(dialog.FileName, ImageFormat.Jpeg)
    except Exception, e:
        print '%s: %s' % e.__class__.__name__, e

b.Click += SaveChart
sheet.E5 = b

Open in new window

ocaccyAuthor Commented:
Thank you, your links solve help me to solve my needs.
Best Regards,
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.