[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1911
  • Last Modified:

Reposition the TITLE and Expand the LEGEND Box on ZedGraph.

Hi,
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.
Why?




// Y AXIS SETTINGS
            //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

title-location.PNG
0
ocaccy
Asked:
ocaccy
  • 4
  • 2
2 Solutions
 
ocaccyAuthor Commented:
xtermie, thank you.



0
 
ocaccyAuthor Commented:
xtermie,

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?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
ocaccyAuthor Commented:
Forgive me.

I do not know VB.

How to transform the code to C #?
b = Button(Text="Save Chart")
def SaveChart():
    try:
        import clr
        clr.AddReference('System.Windows.Forms')
        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

0
 
ocaccyAuthor Commented:
Thank you, your links solve help me to solve my needs.
Best Regards,
ocaccy
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now