Diagramm Skalierung 2. Achse

  • VB.NET

    Diagramm Skalierung 2. Achse

    Hallo,

    bin ganz neu hier im Forum.

    Ich habe ein Diagramm erstellt mit 2 Kurven.
    Nun soll die 2. Y-Achse anders skaliert werden, immer doppelt soviel wie die erste Y-Achse.
    Also die 1. Y-Achse zB bis 10, dann skaliert die 2. automatisch bis 20.
    Ich bekomm das aber nur mit festen Werten hin, möchte dies aber automatisch haben.
    Ich hoffe das ihr mir helfen könnt.

    Liebe Grüße


    VB.NET-Quellcode

    1. Dim read_Leistung = IO.File.ReadAllLines(Application.StartupPath & ".\LTM_PS.txt") 'Liest Daten aus dem Programmpfadordner
    2. Dim read_Drehmoment = IO.File.ReadAllLines(Application.StartupPath & ".\LTM_Nm.txt")
    3. For i = 0 To UBound(read_Leistung) 'Schleife von 0 bis zum Ende der Datei
    4. Dim Werte_Leistung = read_Leistung(i).Split(CChar(" ")) 'Aufteilung in ein Arry von 0 bis Ende der Datei(Unbound)
    5. Dim xWerte_Leistung = Werte_Leistung(0) 'Spalte 0 sind x-Werte
    6. Dim yWerte_Leistung = Werte_Leistung(1) 'Spalte 1 sind y-Werte
    7. Chart1.Series(0).Points.AddXY(xWerte_Leistung, yWerte_Leistung) 'Stellt die x- u . y-Werte im Chart dar
    8. Next i
    9. For i = 0 To UBound(read_Drehmoment) 'Schleife von 0 bis zum Ende der Datei
    10. Dim Werte_Drehmoment = read_Drehmoment(i).Split(CChar(" ")) 'Aufteilung in ein Arry von 0 bis Ende der Datei(Unbound)
    11. Dim xWerte_Drehmoment = Werte_Drehmoment(0) 'Spalte 0 sind x-Werte
    12. Dim yWerte_Drehmoment = Werte_Drehmoment(1) 'Spalte 1 sind y-Werte
    13. Chart1.Series(1).Points.AddXY(xWerte_Drehmoment, yWerte_Drehmoment) 'Stellt die x- u . y-Werte im Chart dar
    14. Next i