Sign In  Sign Up Live-Chat

Modulation de l'axe des X

Last post 09-09-2008, 12:30 PM by Amjad Sahi. 32 replies.
Page 2 of 3 (33 items)   < Previous 1 2 3 Next >
Sort Posts: Previous Next
  •  05-27-2008, 2:52 AM 128719 in reply to 128605

    Re: Modulation de l'axe des X

    Hi,

     Do u want to draw 30 chart area on a image and keep the size of every chart area to be same as the image with 3 chart area?

     


    Roger Mo
    Developer
    Aspose Nanjing Team
    Contact Us
     
  •  05-27-2008, 5:41 AM 128748 in reply to 128719

    Re: Modulation de l'axe des X

    Attachment: Present (inaccessible)
    I created 3 graphics
    -- For 1 day
    -- For 3 days
    -- For 23 days

    The problem lies in the legend. The coloured points are no longer visible.

    Y Does it possible to grow?

    Thanks in advance
     
    - Graphics in TestAspose.zip
     
     
  •  05-28-2008, 2:32 AM 128917 in reply to 128719

    Re: Modulation de l'axe des X

    Hi,

    Could you attached the codes that creats chart with 23 days?  Thanks


    Roger Mo
    Developer
    Aspose Nanjing Team
    Contact Us
     
  •  05-28-2008, 4:21 AM 128940 in reply to 128917

    Re: Modulation de l'axe des X

    Hello,

    You can change the number of days in the line 

    int NbreGraphes =23;

    Thanks

     

    protected void Button4_Click(object sender, EventArgs e)
            {
                Chart c = new Chart();
                c.Height = 900;
                c.Width = 1300;
                c.BackColor = Color.FromArgb(250, 250, 250);
                c.Titles.Add(new Title());
                c.Titles[0].Text = "ASPOSE : Line, Hours Format Axis X";
                c.ChartAreaLayout = LayoutType.Row;
                ChartArea a = null;

                int NbreGraphes =23;

                for (int cnt = 0; cnt < NbreGraphes-1; cnt++)
                {
                    a = new ChartArea(c);
                    c.ChartAreas.Add(a);
                }

                for (int x = 0; x < NbreGraphes; x++)
                {

                    c.ChartAreas[x].AxisX.IsAutoCalc = false;
                    c.ChartAreas[x].AxisX.DefaultLabel.FontAngle = -90;
                    c.ChartAreas[x].AxisX.DefaultLabel.Font = new Font("Arial", 8);
                    c.ChartAreas[x].AxisX.Minimum = (new DateTime(2007, 8, 1 , 8, 0, 0).AddDays(x)).ToOADate();
                    c.ChartAreas[x].AxisX.Maximum = (new DateTime(2007, 8, 1 , 18, 0, 0).AddDays(x)).ToOADate();
                    // c.ChartAreas[x].AxisX.DefaultLabel.Format = "hh:mm";
                    c.ChartAreas[x].AxisX.DefaultLabel.Format = "t";
                    c.ChartAreas[x].AxisX.IntervalType = IntervalType.DateTime;
                    c.ChartAreas[x].AxisX.DateTimeIntervalType = DateTimeIntervalType.Hours;
                    c.ChartAreas[x].AxisX.Interval = 1;
                    c.ChartAreas[x].Name = string.Format("Area{0}", x + 1);
                    c.ChartAreas[x].IsMargin = false;
                    c.ChartAreas[x].AxisAreaPosition = new System.Drawing.RectangleF(70 + x * (1200 / NbreGraphes), 100, (1200 / NbreGraphes)-5, 600);
                    c.ChartAreas[x].AxisY.IsAutoCalc = false;
                    c.ChartAreas[x].AxisY.Interval = 20000;
                    c.ChartAreas[x].AxisY.Minimum = 0;
                    c.ChartAreas[x].AxisY.Maximum = 100000;
                    c.ChartAreas[x].AxisY.IntervalType = IntervalType.Int;
                    c.ChartAreas[x].BackColor = Color.White;
                }


                for (int x = 0; x < NbreGraphes; x++)
                {
                    Series s0 = new Series();
                    s0.ChartArea = string.Format("Area{0}", x+1);
                    s0.ChartType = ChartType.Line;
                    s0.Name = "Rapidité d'accès au réseau interne";
                    s0.DataPoints.Add(new DataPoint("point", (new DateTime(2007, 8, 1, 8, 0, 0).AddDays(x)).ToOADate(), 43000));
                    s0.DataPoints.Add(new DataPoint("point", (new DateTime(2007, 8, 1, 8, 30, 0).AddDays(x)).ToOADate(), 29140));
                    s0.DataPoints.Add(new DataPoint("point", (new DateTime(2007, 8, 1, 9, 4, 0).AddDays(x)).ToOADate(), 14790));
                    s0.DataPoints.Add(new DataPoint("point", (new DateTime(2007, 8, 1, 9, 33, 0).AddDays(x)).ToOADate(), 36140));
                    s0.DataPoints.Add(new DataPoint("point", (new DateTime(2007, 8, 1, 10, 3, 0).AddDays(x)).ToOADate(), 29480));
                    s0.DataPoints.Add(new DataPoint("point", (new DateTime(2007, 8, 1, 10, 34, 0).AddDays(x)).ToOADate(), 31610));
                    s0.DataPoints.Add(new DataPoint("point", (new DateTime(2007, 8, 1, 11, 3, 0).AddDays(x)).ToOADate(), 40230));
                    s0.DataPoints.Add(new DataPoint("point", (new DateTime(2007, 8, 1, 11, 34, 0).AddDays(x)).ToOADate(), 36310));
                    s0.DataPoints.Add(new DataPoint("point", (new DateTime(2007, 8, 1, 12, 0, 0).AddDays(x)).ToOADate(), 36420));
                    s0.DataPoints.Add(new DataPoint("point", (new DateTime(2007, 8, 1, 12, 30, 0).AddDays(x)).ToOADate(), 20370));
                    s0.DataPoints.Add(new DataPoint("point", (new DateTime(2007, 8, 1, 13, 30, 0).AddDays(x)).ToOADate(), 49530));
                    s0.DataPoints.Add(new DataPoint("point", (new DateTime(2007, 8, 1, 15, 4, 0).AddDays(x)).ToOADate(), 15150));
                    s0.DataPoints.Add(new DataPoint("point", (new DateTime(2007, 8, 1, 15, 34, 0).AddDays(x)).ToOADate(), 16730));
                    //s0.IsPrimaryAxisX = false;
                    //s0.IsPrimaryAxisY = false;

                    c.SeriesCollection.Add(s0);
                }
                for (int x = 1; x < NbreGraphes; x++)
                {
                    c.ChartAreas[x].AxisY.AxisLabels.Clear();
                    c.ChartAreas[x].AxisY.MajorTickMark.IsVisible = false;
                    c.ChartAreas[x].AxisY.MinorTickMark.IsVisible = false;
                }
                for (int x = 0; x < NbreGraphes; x++)
                {
                    AxisLabel label = new AxisLabel();
                    label.IsCustomLabelGridVisible = true;
                    label.Color = Color.Black;
                    label.Text = string.Format("{0}",(x + 1));
                    label.FromValue = (new DateTime(2007, 8, 1 , 8, 0, 0).AddDays(x)).ToOADate();
                    label.ToValue = (new DateTime(2007, 8, 1 , 18, 0, 0).AddDays(x)).ToOADate();
                    label.Font = new Font("Arial", 10);
                    c.ChartAreas[x].AxisX.CustomLabels.Add(label);

                    if (x == 2)
                    {
                        LegendBox legendBox = c.ChartAreas[x ].LegendBox;
                        legendBox.IsVisible = true;
                        // Setting gradient background color
                        legendBox.GradientType = GradientType.HorizontalCenter;
                        legendBox.GradientBackColor = Color.Cornsilk;
                        // Setting border
                        legendBox.BorderColor = Color.Bisque;
                        legendBox.BorderWidth = 3;
                        // Setting position
                        legendBox.LegendPositionType = LegendPositionType.Right;
                        // Setting layout
                        // legendBox.LayoutType = LayoutType.TableVertical;
                        legendBox.LayoutType = LayoutType.Row;
                        // Setting type
                        legendBox.LegendBoxType = LegendBoxType.OutsideChartArea;
                        // Setting items type
                        legendBox.LegendItemsType = LegendItemsType.BySeries;

                        legendBox.LegendPositionType = LegendPositionType.Custom;
                        legendBox.Font = new Font("Arial", 12);
                        legendBox.Position = new RectangleF(20, 45, 1270, 35);


                    }
                    else
                    {
                        c.ChartAreas[x].LegendBox.IsVisible = false;
                    }
                    c.ChartAreas[x].AxisX.IsAutoCalc = false;


                }

                MemoryStream ms = new MemoryStream();

                c.Save(ms, ImageFormat.Png);
                Response.Clear();
                Response.ContentType = "image/png";
                Response.OutputStream.Write(ms.ToArray(), 0, (int)ms.Length);


            }

     
  •  05-28-2008, 9:20 PM 129122 in reply to 128940

    Re: Modulation de l'axe des X

    Thanks for the codes you provided. we will look into it soon.
    Roger Mo
    Developer
    Aspose Nanjing Team
    Contact Us
     
  •  05-29-2008, 4:14 AM 129185 in reply to 129122

    Re: Modulation de l'axe des X

    Attachment: Present (inaccessible)

    Hi,

    Please try the attached fix.

    I added "LegendBox.MarkerSize" for getting a custome marker size. In current version, marker size relate to chart area width. When we add graph number, chart area width is decreased and then marker size is decreased too.


    Roger Mo
    Developer
    Aspose Nanjing Team
    Contact Us
     
  •  06-09-2008, 8:51 AM 130547 in reply to 129185

    Re: Modulation de l'axe des X

    Thanks
     
  •  06-11-2008, 5:14 AM 130910 in reply to 129185

    Re: Modulation de l'axe des X

    Hi,
     
    This change is essential in the ongoing development. Do you think that this new property will be integrated into the new version of the object aspose.chart. The architects of my company could not validate this solution without it.

    Thanks in advance
     
  •  06-11-2008, 5:44 AM 130914 in reply to 130910

    Re: Modulation de l'axe des X

    Hi,

    Yes, our next official release of the component would include the functionality of this fix.

    Thank you.


    Amjad Sahi
    Support Developer,
    Aspose Nanjing Team
    Contact Us
     
  •  06-12-2008, 3:22 AM 131046 in reply to 130914

    Re: Modulation de l'axe des X

    Hi,

    Starting from when this update will be integrated it?
     
  •  06-12-2008, 4:05 AM 131058 in reply to 131046

    Re: Modulation de l'axe des X

    Hi,

    Well, you may use this fix without any problem, the fix will be like the official version. However, you can expect the next official version (which will include the functionality of the fix) before the end of next week if we complete all the tasks on hand.

    Thank you.


    Amjad Sahi
    Support Developer,
    Aspose Nanjing Team
    Contact Us
     
  •  07-21-2008, 3:33 AM 136237 in reply to 131058

    Re: Modulation de l'axe des X

    Attachment: Present (inaccessible)

    Good morning,

    Always with the same program, I have a new problem. When I figure in a stream to the page, the graph is correct, but when I save in a file on the site to be able to recover later, the details of the Y axis appear several times.

    The code :

    //

    // Suppression des information à gauche de l'axe des Y sauf pour la première série

    // -----------------------------------------------------------------------

    for (int intGraph = 1; intGraph < NbreJoursOuvres; intGraph++)

    {

    c.ChartAreas[intGraph].AxisY.AxisLabels.Clear();

    c.ChartAreas[intGraph].AxisY.MajorTickMark.IsVisible = false;

    c.ChartAreas[intGraph].AxisY.MinorTickMark.IsVisible = false;

    }

    //
    // Sauvegarde du fichier dans un répertoire temporaire
    // ----------------------------------------------------
    string StrNomDuFichier = Server.MapPath("./Temp") + "/Graphique_Aspose_Chart_KO.png";
    c.Save(StrNomDuFichier);

    --> Legends on the Y axis appear several times

    //
    // Affichage du résultat dans le fond de la page
    // ---------------------------------------------
    MemoryStream ms = new MemoryStream();
    c.Save(ms, ImageFormat.Png);

    Response.Clear();
    Response.ContentType = "image/png";
    Response.OutputStream.Write(ms.ToArray(), 0, (int)ms.Length);

    -- > The chart is OK

    Thanks for your help

    Jacques TANTUCCI

     
  •  07-21-2008, 7:51 AM 136272 in reply to 136237

    Re: Modulation de l'axe des X

    Hi,

    Thanks for providing us the template images.

    Yes we found the issue, we will figure it out soon.

    Thank you.


    Amjad Sahi
    Support Developer,
    Aspose Nanjing Team
    Contact Us
     
  •  07-22-2008, 1:11 AM 136362 in reply to 136272

    Re: Modulation de l'axe des X

    Sorry, I did not understand your answer. Need more information?
     
  •  07-22-2008, 1:36 AM 136365 in reply to 136362

    Re: Modulation de l'axe des X

    Hi,
    Oui, vous avez raison. Je l'ai examiné et ai trouvé le problème que vous avez mentionné. Nous le fixerons bientôt. Merci.

    Amjad Sahi
    Support Developer,
    Aspose Nanjing Team
    Contact Us
     
Page 2 of 3 (33 items)   < Previous 1 2 3 Next >
View as RSS news feed in XML