IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

VB.NET Discussion :

PolygonAnnotation, graphique et pixel


Sujet :

VB.NET

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé
    Homme Profil pro
    Inscrit en
    Octobre 2010
    Messages
    338
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Rhône (Rhône Alpes)

    Informations forums :
    Inscription : Octobre 2010
    Messages : 338
    Par défaut PolygonAnnotation, graphique et pixel
    Bonjour à tous,

    Je souhaite réaliser un polygon annotation sur un graphique (droite définie par des coordonnées X et Y de mon abscisse et de mon ordonnée)

    Il semblerait que le polygon annotation soit défini en pixel par rapport au chart area et non en points X et Y par rapports à mes abscisses.

    Je voulais savoir s'il était possible de transformer des coordonnées X et Y de mon abscisse et de mon ordonnée en coordonnées pixel ?

    Mon graphique :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
     Aire2.Name = "Aire2"
                    Graph2.ChartAreas.Add(Aire2)
                    Graph2.Cursor = Cursors.Cross
     
                    Graph2.Location = New System.Drawing.Point(0, 0)
                    Graph2.Size = New System.Drawing.Size(982, 662)
     
                    Graph2.Titles.Add("Détermination de la morphologie des feuillets en fonction du potentiel chimique en soufre")
                    Graph2.Titles(0).Font = New Font("Arial", 14, FontStyle.Bold)
                    Graph2.Titles(0).Text = "Détermination de la morphologie des feuillets en fonction du potentiel chimique en soufre"
                    Graph2.Titles(0).ForeColor = ParamCalcRay.T2.BackColor
                    Graph2.Titles(0).Alignment = System.Drawing.ContentAlignment.MiddleCenter
                    Graph2.Titles(0).Docking = Docking.Top
                    Graph2.Titles(0).IsDockedInsideChartArea = True
                    Graph2.Titles(0).Position.Auto = True
     
                    Graph2.ChartAreas(0).AxisX.Title = "Potentiel chimique en soufre (eV)"
                    Graph2.ChartAreas(0).AxisX.TitleAlignment = StringAlignment.Center
                    Graph2.ChartAreas(0).AxisX.LineWidth = 2
                    Graph2.ChartAreas(0).AxisX.MajorGrid.Enabled = False
                    Graph2.ChartAreas(0).AxisX.MinorGrid.Enabled = False
                    Graph2.ChartAreas(0).AxisX.Crossing = -2
                    Graph2.ChartAreas(0).AxisX.TitleFont = New Font("Arial", 12, FontStyle.Bold)
                    Graph2.ChartAreas(0).AxisX.TitleForeColor = ParamCalcRay.A2.BackColor
                    Graph2.ChartAreas(0).AxisX.LineColor = ParamCalcRay.A2.BackColor
                    Graph2.ChartAreas(0).AxisX.Minimum = -2
                    Graph2.ChartAreas(0).AxisX.Maximum = 0
                    Graph2.ChartAreas(0).AxisX.MajorTickMark.Interval = 0.5
                    Graph2.ChartAreas(0).AxisX.MajorTickMark.LineColor = ParamCalcRay.A2.BackColor
                    Graph2.ChartAreas(0).AxisX.MajorTickMark.Size = 2
                    Graph2.ChartAreas(0).AxisX.MajorTickMark.TickMarkStyle = TickMarkStyle.AcrossAxis
                    Graph2.ChartAreas(0).AxisX.MinorTickMark.Interval = 0.1
                    Graph2.ChartAreas(0).AxisX.MinorTickMark.LineColor = ParamCalcRay.A2.BackColor
                    Graph2.ChartAreas(0).AxisX.MinorTickMark.Size = 1
                    Graph2.ChartAreas(0).AxisX.MinorTickMark.TickMarkStyle = TickMarkStyle.InsideArea
                    Graph2.ChartAreas(0).AxisX.LabelStyle.Font = New Font("Arial", 12, FontStyle.Bold)
                    Graph2.ChartAreas(0).AxisX.LabelStyle.ForeColor = ParamCalcRay.A2.BackColor
                    Graph2.ChartAreas(0).AxisX.LabelStyle.Interval = 0.5
                    Graph2.ChartAreas(0).AxisX.IsMarksNextToAxis = True
     
                    Graph2.ChartAreas(0).AxisY.Title = "Pourcentage de bords M (%)"
                    Graph2.ChartAreas(0).AxisY.TitleAlignment = StringAlignment.Center
                    Graph2.ChartAreas(0).AxisY.LineWidth = 2
                    Graph2.ChartAreas(0).AxisY.MajorGrid.Enabled = False
                    Graph2.ChartAreas(0).AxisY.MinorGrid.Enabled = False
                    Graph2.ChartAreas(0).AxisY.MajorTickMark.Size = 2
                    Graph2.ChartAreas(0).AxisY.MajorTickMark.TickMarkStyle = TickMarkStyle.AcrossAxis
                    Graph2.ChartAreas(0).AxisY.MinorTickMark.Size = 0.5
                    Graph2.ChartAreas(0).AxisY.MinorTickMark.TickMarkStyle = TickMarkStyle.InsideArea
                    Graph2.ChartAreas(0).AxisY.TitleFont = New Font("Arial", 12, FontStyle.Bold)
                    Graph2.ChartAreas(0).AxisY.TitleForeColor = ParamCalcRay.O2.BackColor
                    Graph2.ChartAreas(0).AxisY.LineColor = ParamCalcRay.O2.BackColor
                    Graph2.ChartAreas(0).AxisY.Minimum = 0
                    Graph2.ChartAreas(0).AxisY.Maximum = 100
                    Graph2.ChartAreas(0).AxisY.MajorTickMark.Interval = 25
                    Graph2.ChartAreas(0).AxisY.MajorTickMark.LineColor = ParamCalcRay.O2.BackColor
                    Graph2.ChartAreas(0).AxisY.MajorTickMark.Size = 2
                    Graph2.ChartAreas(0).AxisY.MajorTickMark.TickMarkStyle = TickMarkStyle.AcrossAxis
                    Graph2.ChartAreas(0).AxisY.MinorTickMark.Interval = 5
                    Graph2.ChartAreas(0).AxisY.MinorTickMark.LineColor = ParamCalcRay.O2.BackColor
                    Graph2.ChartAreas(0).AxisY.MinorTickMark.Size = 1
                    Graph2.ChartAreas(0).AxisY.MinorTickMark.TickMarkStyle = TickMarkStyle.InsideArea
                    Graph2.ChartAreas(0).AxisY.LabelStyle.Font = New Font("Arial", 12, FontStyle.Bold)
                    Graph2.ChartAreas(0).AxisY.LabelStyle.ForeColor = ParamCalcRay.O2.BackColor
                    Graph2.ChartAreas(0).AxisY.LabelStyle.Interval = 25
                    Graph2.ChartAreas(0).AxisY.IsMarksNextToAxis = True
     
                    '   Graph2.ChartAreas(0).AxisY2.LineWidth = 2
                    '  Graph2.ChartAreas(0).AxisY2.MajorGrid.Enabled = False
                    ' Graph2.ChartAreas(0).AxisY2.MinorGrid.Enabled = False
                    'Graph2.ChartAreas(0).AxisY2.LineColor = Param2.Button32.BackColor
                    ' Graph2.ChartAreas(0).AxisY2.Minimum = 0
                    '  Graph2.ChartAreas(0).AxisY2.Maximum = 100
                    '   Graph2.ChartAreas(0).AxisY2.MajorTickMark.Interval = 25
                    '    Graph2.ChartAreas(0).AxisY2.MajorTickMark.LineColor = Param2.Button32.BackColor
                    '     Graph2.ChartAreas(0).AxisY2.MajorTickMark.Size = 2
                    '      Graph2.ChartAreas(0).AxisY2.MajorTickMark.TickMarkStyle = TickMarkStyle.AcrossAxis
                    '       Graph2.ChartAreas(0).AxisY2.MinorTickMark.Interval = 5
                    '        Graph2.ChartAreas(0).AxisY2.MinorTickMark.LineColor = Param2.Button32.BackColor
                    '         Graph2.ChartAreas(0).AxisY2.MinorTickMark.Size = 1
                    '          Graph2.ChartAreas(0).AxisY2.MinorTickMark.TickMarkStyle = TickMarkStyle.InsideArea
                    '           Graph2.ChartAreas(0).AxisY2.LabelStyle.Enabled = False
                    '            Graph2.ChartAreas(0).AxisY2.Enabled = AxisEnabled.True
     
                    If ParamCalcRay.V5.Checked = True Then
                        S1b.Name = "S1b"
                        Graph2.Series.Add("S1b")
                        Graph2.Series("S1b").Points.DataBindXY(Tx, Ty)
                        Graph2.Series("S1b").ChartType = SeriesChartType.Line
                        Graph2.Series("S1b").BorderWidth = 2
                        Graph2.Series("S1b").ChartArea = "Aire2"
                        Graph2.Series("S1b").ToolTip = "x : #VALX ; y : #VALY"
                        Graph2.Series("S1b").Color = ParamCalcRay.C5.BackColor
                        Graph2.Series("S1b").BorderDashStyle = ChartDashStyle.Solid
                        Graph2.Series("S1b").YAxisType = AxisType.Primary
     
                    End If
     
                    CalcRay.TabControl1.TabPages(2).Controls.Add(Graph2)
     
                   Graph2.Dock = DockStyle.Fill
    Exemple pour dessiner un polygon annotation :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    Dim PolygonAnnotation1 As System.Windows.Forms.DataVisualization.Charting.PolygonAnnotation = New System.Windows.Forms.DataVisualization.Charting.PolygonAnnotation()
            Dim AnnotationPathPoint1 As System.Windows.Forms.DataVisualization.Charting.AnnotationPathPoint = New System.Windows.Forms.DataVisualization.Charting.AnnotationPathPoint()
            Dim AnnotationPathPoint2 As System.Windows.Forms.DataVisualization.Charting.AnnotationPathPoint = New System.Windows.Forms.DataVisualization.Charting.AnnotationPathPoint()
            Dim AnnotationPathPoint3 As System.Windows.Forms.DataVisualization.Charting.AnnotationPathPoint = New System.Windows.Forms.DataVisualization.Charting.AnnotationPathPoint()
            Dim AnnotationPathPoint4 As System.Windows.Forms.DataVisualization.Charting.AnnotationPathPoint = New System.Windows.Forms.DataVisualization.Charting.AnnotationPathPoint()
            Dim ChartArea1 As System.Windows.Forms.DataVisualization.Charting.ChartArea = New System.Windows.Forms.DataVisualization.Charting.ChartArea()
            Dim Legend1 As System.Windows.Forms.DataVisualization.Charting.Legend = New System.Windows.Forms.DataVisualization.Charting.Legend()
            Dim Series1 As System.Windows.Forms.DataVisualization.Charting.Series = New System.Windows.Forms.DataVisualization.Charting.Series()
            Me.Chart1 = New System.Windows.Forms.DataVisualization.Charting.Chart()
            CType(Me.Chart1, System.ComponentModel.ISupportInitialize).BeginInit()
            Me.SuspendLayout()
            '
            'Chart1
            '
            PolygonAnnotation1.AxisXName = "ChartArea1\rX"
            AnnotationPathPoint1.PointType = CType(0, Byte)
            AnnotationPathPoint1.X = 2.0!
            AnnotationPathPoint2.X = 7.0!
            AnnotationPathPoint3.X = 7.0!
            AnnotationPathPoint3.Y = 60.0!
            AnnotationPathPoint4.X = 2.0!
            AnnotationPathPoint4.Y = 60.0!
            PolygonAnnotation1.GraphicsPathPoints.Add(AnnotationPathPoint1)
            PolygonAnnotation1.GraphicsPathPoints.Add(AnnotationPathPoint2)
            PolygonAnnotation1.GraphicsPathPoints.Add(AnnotationPathPoint3)
            PolygonAnnotation1.GraphicsPathPoints.Add(AnnotationPathPoint4)
            PolygonAnnotation1.Name = "PolygonAnnotation1"
            PolygonAnnotation1.SmartLabelStyle.AllowOutsidePlotArea = System.Windows.Forms.DataVisualization.Charting.LabelOutsidePlotAreaStyle.No
            PolygonAnnotation1.ToolTip = "dkfwknbg"
            PolygonAnnotation1.YAxisName = "ChartArea1\rY"
            Me.Chart1.Annotations.Add(PolygonAnnotation1)
            ChartArea1.Name = "ChartArea1"
            Me.Chart1.ChartAreas.Add(ChartArea1)
            Legend1.Name = "Legend1"
            Me.Chart1.Legends.Add(Legend1)
            Me.Chart1.Location = New System.Drawing.Point(140, 64)
            Me.Chart1.Name = "Chart1"
            Series1.ChartArea = "ChartArea1"
            Series1.Legend = "Legend1"
            Series1.Name = "Series1"
            Me.Chart1.Series.Add(Series1)
            Me.Chart1.Size = New System.Drawing.Size(300, 300)
            Me.Chart1.TabIndex = 0
            Me.Chart1.Text = "Chart1"
            '
            'Form2
            '
            Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
            Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
            Me.ClientSize = New System.Drawing.Size(749, 640)
            Me.Controls.Add(Me.Chart1)
            Me.Name = "Form2"
            Me.Text = "Form2"
            CType(Me.Chart1, System.ComponentModel.ISupportInitialize).EndInit()
            Me.ResumeLayout(False)
    Je ne sais pas à quoi correspond le ! dans les lignes suivantes :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    AnnotationPathPoint1.X = 2.0!
            AnnotationPathPoint2.X = 7.0!
            AnnotationPathPoint3.X = 7.0!
            AnnotationPathPoint3.Y = 60.0!
            AnnotationPathPoint4.X = 2.0!
            AnnotationPathPoint4.Y = 60.0!
    , est ce que quelqu'un saurait ?

    Merci d'avance pour votre aide

  2. #2
    Membre Expert Avatar de hunteshiva
    Homme Profil pro
    Chef de projet en SSII
    Inscrit en
    Février 2010
    Messages
    1 069
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Chef de projet en SSII
    Secteur : Industrie

    Informations forums :
    Inscription : Février 2010
    Messages : 1 069
    Par défaut
    Bonjour,

    je te conseil de regarder ce tuto pour mieux comprendre les chartGraphiques
    http://plasserre.developpez.com/cours/chart

    pour répondre a ta question, auncune idée
    ou as tu trouvé ce code?

    pour les annotation, tu a le chapitre qui va bien, et la au moins tu comprend ce que tu fait
    III-B-7. Annotations

  3. #3
    Membre éclairé
    Homme Profil pro
    Inscrit en
    Octobre 2010
    Messages
    338
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Rhône (Rhône Alpes)

    Informations forums :
    Inscription : Octobre 2010
    Messages : 338
    Par défaut
    Merci pour ces infos.

    Je me suis déjà appuyé sur ce cours pour réaliser mes graphiques et c'est vrai qu'il est très bien fait. Et même s'il explique la façon de réaliser des annotations il n'explique pas comment faire des polygon annotation et il semblerait que la méthodologie de ce type d'annotation diffère des annotations plus conventionnelles.

    Encore merci pour ton aide

  4. #4
    Membre Expert Avatar de hunteshiva
    Homme Profil pro
    Chef de projet en SSII
    Inscrit en
    Février 2010
    Messages
    1 069
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Chef de projet en SSII
    Secteur : Industrie

    Informations forums :
    Inscription : Février 2010
    Messages : 1 069
    Par défaut
    Oui je m'en suis rendu compte après

    bah écoute même en regardant le site msdn pour comprendre le système des anotations Points
    J'ai trouvé ceci

    AnnotationPathPoint()
    Initialise une nouvelle instance de la classe AnnotationPathPoint.
    AnnotationPathPoint(Single, Single)
    Initialise une nouvelle instance de la classe AnnotationPathPoint avec les valeurs x et y spécifiées.
    AnnotationPathPoint(Single, Single, Byte)
    Initialise une nouvelle instance de la classe AnnotationPathPoint avec les valeurs de point x, y et type spécifiées.



    Sachant que tu ne fais que
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    Dim AnnotationPathPoint1 As System.Windows.Forms.DataVisualization.Charting.AnnotationPathPoint = _
    New System.Windows.Forms.DataVisualization.Charting.AnnotationPathPoint()
    tu dois donner des valeur à X et Y
    X -> Obtient ou définit la coordonnée X du point de tracé d'une annotation.
    Y -> Obtient ou définit la coordonnée Y du point de tracé d'une annotation.

    après je ne comprend pas ou est ton soucis,
    pour moi les points d'exclamation devraient générer une erreur
    (jamais vue ça en vb.net)

    en te regardant le détail de la class, tu sais quels sont les paramètres accessibles ainsi que ce que tu veux en faire
    Bref tout est sur la toile... (sauf ton réel problème ^^)

    J'ai trouvé ça aussi pour convertir des points en Pixel (vue que ça dépend de la résolution de ta machine
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
        Public Declare Function GetDC Lib "user32" (ByVal hwnd As IntPtr) As Int32
        Public Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As IntPtr, ByVal nIndex As Int32) As Int32
        Public Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Int32, ByVal hdc As Int32) As Int32
     
        Public Const LOGPIXELSX = 88
        Private Const POINTS_PER_INCH As Long = 72
     
        Public Function PointsPerPixel() As Double
            Dim hDC As IntPtr
            Dim lDotsPerInch As Int32
            hDC = GetDC(IntPtr.Zero)
            lDotsPerInch = GetDeviceCaps(hDC, LOGPIXELSX)
            PointsPerPixel = POINTS_PER_INCH / lDotsPerInch
            ReleaseDC(IntPtr.Zero, hDC)
            Return PointsPerPixel
        End Function

  5. #5
    Membre éclairé
    Homme Profil pro
    Inscrit en
    Octobre 2010
    Messages
    338
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Rhône (Rhône Alpes)

    Informations forums :
    Inscription : Octobre 2010
    Messages : 338
    Par défaut
    Merci beaucoup pour ton aide !

    Je vais regarder ça de près !

    En fait mon problème c'est qu'à priori le polygon annotation nécessite des coordonnées de type X et Y en pixel or je souhaiterais les définir en valeurs abscisse et ordonnées de mon graphique. (Le but étant de définir différentes zones (ou domaines) sur mon graphique).

    PS mon graphique est une courbe définie par des axes (graphique de type scientifique).

    Encore merci de ton aide, je vais regarder tes suggestions et je reviens te voir si je n'y arrive pas

  6. #6
    Membre éclairé
    Homme Profil pro
    Inscrit en
    Octobre 2010
    Messages
    338
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Rhône (Rhône Alpes)

    Informations forums :
    Inscription : Octobre 2010
    Messages : 338
    Par défaut
    Bonjour,

    Voici mon code mais rien n'est affiché (ormis le graphique et l'annotation (ano2) mais pas mon polygon annotation (annot))

    Je ne comprends pas pourquoi.

    Auriez vous des suggestions :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
      Dim Graph2ray As New Chart
                    Dim Aire2 As New ChartArea
                    Dim S1b As New Series, S2b As New Series, S3b As New Series
     
                    Dim Ano2 As New CalloutAnnotation()
     
                    Aire2.Name = "Aire2"
                    Graph2ray.ChartAreas.Add(Aire2)
                    Graph2ray.Cursor = Cursors.Cross
     
                    Graph2ray.Location = New System.Drawing.Point(0, 0)
                    Graph2ray.Size = New System.Drawing.Size(982, 662)
     
                    Graph2ray.Titles.Add("Détermination de la morphologie des feuillets en fonction du potentiel chimique en soufre")
                    Graph2ray.Titles(0).Font = New Font("Arial", 14, FontStyle.Bold)
                    Graph2ray.Titles(0).Text = "Détermination de la morphologie des feuillets en fonction du potentiel chimique en soufre"
                    Graph2ray.Titles(0).ForeColor = ParamCalcRay.T2.BackColor
                    Graph2ray.Titles(0).Alignment = System.Drawing.ContentAlignment.MiddleCenter
                    Graph2ray.Titles(0).Docking = Docking.Top
                    Graph2ray.Titles(0).IsDockedInsideChartArea = True
                    Graph2ray.Titles(0).Position.Auto = True
     
                    Graph2ray.ChartAreas(0).AxisX.Title = "Potentiel chimique en soufre (eV)"
                    Graph2ray.ChartAreas(0).AxisX.TitleAlignment = StringAlignment.Center
                    Graph2ray.ChartAreas(0).AxisX.LineWidth = 2
                    Graph2ray.ChartAreas(0).AxisX.MajorGrid.Enabled = False
                    Graph2ray.ChartAreas(0).AxisX.MinorGrid.Enabled = False
                    Graph2ray.ChartAreas(0).AxisX.Crossing = -2
                    Graph2ray.ChartAreas(0).AxisX.TitleFont = New Font("Arial", 12, FontStyle.Bold)
                    Graph2ray.ChartAreas(0).AxisX.TitleForeColor = ParamCalcRay.A2.BackColor
                    Graph2ray.ChartAreas(0).AxisX.LineColor = ParamCalcRay.A2.BackColor
                    Graph2ray.ChartAreas(0).AxisX.Minimum = -2
                    Graph2ray.ChartAreas(0).AxisX.Maximum = 0
                    Graph2ray.ChartAreas(0).AxisX.MajorTickMark.Interval = 0.5
                    Graph2ray.ChartAreas(0).AxisX.MajorTickMark.LineColor = ParamCalcRay.A2.BackColor
                    Graph2ray.ChartAreas(0).AxisX.MajorTickMark.Size = 2
                    Graph2ray.ChartAreas(0).AxisX.MajorTickMark.TickMarkStyle = TickMarkStyle.AcrossAxis
                    Graph2ray.ChartAreas(0).AxisX.MinorTickMark.Interval = 0.1
                    Graph2ray.ChartAreas(0).AxisX.MinorTickMark.LineColor = ParamCalcRay.A2.BackColor
                    Graph2ray.ChartAreas(0).AxisX.MinorTickMark.Size = 1
                    Graph2ray.ChartAreas(0).AxisX.MinorTickMark.TickMarkStyle = TickMarkStyle.InsideArea
                    Graph2ray.ChartAreas(0).AxisX.LabelStyle.Font = New Font("Arial", 12, FontStyle.Bold)
                    Graph2ray.ChartAreas(0).AxisX.LabelStyle.ForeColor = ParamCalcRay.A2.BackColor
                    Graph2ray.ChartAreas(0).AxisX.LabelStyle.Interval = 0.5
                    Graph2ray.ChartAreas(0).AxisX.IsMarksNextToAxis = True
     
                    Graph2ray.ChartAreas(0).AxisY.Title = "Pourcentage de bords M (%)"
                    Graph2ray.ChartAreas(0).AxisY.TitleAlignment = StringAlignment.Center
                    Graph2ray.ChartAreas(0).AxisY.LineWidth = 2
                    Graph2ray.ChartAreas(0).AxisY.MajorGrid.Enabled = False
                    Graph2ray.ChartAreas(0).AxisY.MinorGrid.Enabled = False
                    Graph2ray.ChartAreas(0).AxisY.MajorTickMark.Size = 2
                    Graph2ray.ChartAreas(0).AxisY.MajorTickMark.TickMarkStyle = TickMarkStyle.AcrossAxis
                    Graph2ray.ChartAreas(0).AxisY.MinorTickMark.Size = 0.5
                    Graph2ray.ChartAreas(0).AxisY.MinorTickMark.TickMarkStyle = TickMarkStyle.InsideArea
                    Graph2ray.ChartAreas(0).AxisY.TitleFont = New Font("Arial", 12, FontStyle.Bold)
                    Graph2ray.ChartAreas(0).AxisY.TitleForeColor = ParamCalcRay.O2.BackColor
                    Graph2ray.ChartAreas(0).AxisY.LineColor = ParamCalcRay.O2.BackColor
                    Graph2ray.ChartAreas(0).AxisY.Minimum = 0
                    Graph2ray.ChartAreas(0).AxisY.Maximum = 100
                    Graph2ray.ChartAreas(0).AxisY.MajorTickMark.Interval = 25
                    Graph2ray.ChartAreas(0).AxisY.MajorTickMark.LineColor = ParamCalcRay.O2.BackColor
                    Graph2ray.ChartAreas(0).AxisY.MajorTickMark.Size = 2
                    Graph2ray.ChartAreas(0).AxisY.MajorTickMark.TickMarkStyle = TickMarkStyle.AcrossAxis
                    Graph2ray.ChartAreas(0).AxisY.MinorTickMark.Interval = 5
                    Graph2ray.ChartAreas(0).AxisY.MinorTickMark.LineColor = ParamCalcRay.O2.BackColor
                    Graph2ray.ChartAreas(0).AxisY.MinorTickMark.Size = 1
                    Graph2ray.ChartAreas(0).AxisY.MinorTickMark.TickMarkStyle = TickMarkStyle.InsideArea
                    Graph2ray.ChartAreas(0).AxisY.LabelStyle.Font = New Font("Arial", 12, FontStyle.Bold)
                    Graph2ray.ChartAreas(0).AxisY.LabelStyle.ForeColor = ParamCalcRay.O2.BackColor
                    Graph2ray.ChartAreas(0).AxisY.LabelStyle.Interval = 25
                    Graph2ray.ChartAreas(0).AxisY.IsMarksNextToAxis = True
     
                    If ParamCalcRay.V5.Checked = True Then
                        S1b.Name = "S1b"
                        Graph2ray.Series.Add("S1b")
                        Graph2ray.Series("S1b").Points.DataBindXY(Tx, Ty)
                        Graph2ray.Series("S1b").ChartType = SeriesChartType.Line
                        Graph2ray.Series("S1b").BorderWidth = 2
                        Graph2ray.Series("S1b").ChartArea = "Aire2"
                        Graph2ray.Series("S1b").ToolTip = "x : #VALX ; y : #VALY"
                        Graph2ray.Series("S1b").Color = ParamCalcRay.C5.BackColor
                        Graph2ray.Series("S1b").BorderDashStyle = ChartDashStyle.Solid
                        Graph2ray.Series("S1b").YAxisType = AxisType.Primary
     
                    End If
     
                    If ParamCalcRay.V6.Checked = True Then
                        S2b.Name = "S2b"
                        Graph2ray.Series.Add("S2b")
                        Graph2ray.Series("S2b").Points.AddXY(D, 0)
                        Graph2ray.Series("S2b").Points.AddXY(D, Y)
                        Graph2ray.Series("S2b").ChartType = SeriesChartType.Line
                        Graph2ray.Series("S2b").BorderWidth = 2
                        Graph2ray.Series("S2b").ChartArea = "Aire2"
                        Graph2ray.Series("S2b").ToolTip = D & " eV ; " & Y & " %"
                        Graph2ray.Series("S2b").Color = ParamCalcRay.C6.BackColor
                        Graph2ray.Series("S2b").BorderDashStyle = ChartDashStyle.Solid
                        Graph2ray.Series("S2b").YAxisType = AxisType.Primary
     
                        S3b.Name = "S3b"
                        Graph2ray.Series.Add("S3b")
                        Graph2ray.Series("S3b").Points.AddXY(-2, Y)
                        Graph2ray.Series("S3b").Points.AddXY(D, Y)
                        Graph2ray.Series("S3b").ChartType = SeriesChartType.Line
                        Graph2ray.Series("S3b").BorderWidth = 2
                        Graph2ray.Series("S3b").ChartArea = "Aire2"
                        Graph2ray.Series("S3b").ToolTip = D & " eV ; " & Y & " % de bords M"
                        Graph2ray.Series("S3b").Color = ParamCalcRay.C6.BackColor
                        Graph2ray.Series("S3b").BorderDashStyle = ChartDashStyle.Solid
                        Graph2ray.Series("S3b").YAxisType = AxisType.Primary
     
                        If ParamCalcRay.V7.Checked = True Then
                            Ano2.ClipToChartArea = "Aire2"
                            Ano2.Text = "Potentiel chimique en soufre : " & D & " eV ;" & vbNewLine & " Morphologie : " & Y & " % de bords M ;" & vbNewLine & " Couverture en soufre : " & CM & " % de S sur les bords M, " & CS & " % de S sur les bords S"
                            Ano2.ForeColor = ParamCalcRay.C7.BackColor
                            Ano2.Font = New Font("Arial", 10, FontStyle.Bold)
                            Ano2.LineColor = ParamCalcRay.C7.BackColor
                            Ano2.AnchorDataPoint = Graph2ray.Series("S3b").Points(1)
                            Ano2.AllowMoving = True
                            Graph2ray.Annotations.Add(Ano2)
                        End If
                    End If
     
     
     
     
     
                    Dim Annot As New PolygonAnnotation
                    Dim AnnotationPathPoint1 As System.Windows.Forms.DataVisualization.Charting.AnnotationPathPoint = New System.Windows.Forms.DataVisualization.Charting.AnnotationPathPoint(-1.3, 100)
                    Dim AnnotationPathPoint2 As System.Windows.Forms.DataVisualization.Charting.AnnotationPathPoint = New System.Windows.Forms.DataVisualization.Charting.AnnotationPathPoint(-1.3, 55.7682)
                    Dim AnnotationPathPoint3 As System.Windows.Forms.DataVisualization.Charting.AnnotationPathPoint = New System.Windows.Forms.DataVisualization.Charting.AnnotationPathPoint(-0.5385, 82.3515)
                    Dim AnnotationPathPoint4 As System.Windows.Forms.DataVisualization.Charting.AnnotationPathPoint = New System.Windows.Forms.DataVisualization.Charting.AnnotationPathPoint(-0.5385, 100)
     
                    Annot.ClipToChartArea = "Aire2"
     
                    Annot.GraphicsPathPoints.Add(AnnotationPathPoint1)
                    Annot.GraphicsPathPoints.Add(AnnotationPathPoint2)
                    Annot.GraphicsPathPoints.Add(AnnotationPathPoint3)
                    Annot.GraphicsPathPoints.Add(AnnotationPathPoint4)
                    Annot.BackColor = Color.Red
                    Annot.LineColor = Color.Blue
                    Graph2ray.Annotations.Add(Annot)
     
                    CalcRay.TabControl1.TabPages(1).Controls.Add(Graph1ray)
                    CalcRay.TabControl1.TabPages(2).Controls.Add(Graph2ray)
     
                    Graph1ray.Dock = DockStyle.Fill
                    Graph2ray.Dock = DockStyle.Fill

    Merci de votre aide

Discussions similaires

  1. demomakes graphiques pixel: quoi utiliser ?
    Par idmapria dans le forum Développement 2D, 3D et Jeux
    Réponses: 26
    Dernier message: 13/03/2012, 06h36
  2. Diagonale de pixels en mode graphique
    Par litllechicken dans le forum Assembleur
    Réponses: 5
    Dernier message: 03/01/2007, 16h02
  3. [Prog graphique] Décomposition bitmap en pixels
    Par sorry60 dans le forum Assembleur
    Réponses: 19
    Dernier message: 28/04/2005, 15h39
  4. carte graphique et pixels shader
    Par yeeep dans le forum DirectX
    Réponses: 2
    Dernier message: 26/04/2003, 10h54

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo