Ich versuche gerade die Skalierung für die X und Y Achse hinzubekommen aber ich scheitere jedesmal an der X Achse.
Für die Y Achse funktioniert dies :
ch1.Axes(chAxisPositionLeft).NumberFormat = "0.00"
ch1.Axes(chAxisPositionLeft).MajorUnit = 1#
und bei der X Achse habe ich das versucht aber es geht nicht :
ch1.Axes(chAxisPositionBottom).NumberFormat = "0.00"
ch1.Axes(chAxisPositionBottom).MajorUnit = 1#
Es kommt immer wieder die Fehlermeldung : Eine Kategorieachse unterstützt keine Zahlenwerte ?
Ich verstehe es nicht liegt das Problem am Diagrammtyp oder wird das anders definiert ?
Hier ist der Code meines Diagramms :
'Diagramm Parameter Anfang
Dim cc, c
Dim ch1, ch2
Dim pt
ChartSpace1.Clear
Set cc = ChartSpace1.Constants
Set ChartSpace1.DataSource = Spreadsheet1
Set ch1 = ChartSpace1.Charts.Add
Dim nra, nrb, nr As Single
nr = Spreadsheet1.ActiveSheet.Cells(2, 189).Value + 1
nra = "A2:" & "A" & nr
nrb = "B2:" & "B" & nr
ch1.Type = cc.chChartTypeLineMarkers
ch1.SetData 1, 0, nra ' H mWs
ch1.SeriesCollection(0).SetData 2, 0, nrb ' Q m³h
ch1.Axes(chAxisPositionLeft).NumberFormat = "0.00"
ch1.Axes(chAxisPositionLeft).MajorUnit = 1#
ch1.Axes.Add ch1.Axes(chAxisPositionLeft).Scaling, _
chAxisPositionRight, chValueAxis
'Format the Value Axes
ch1.Axes(chAxisPositionRight).NumberFormat = ch1.Axes(chAxisPositionLeft).NumberFormat
ch1.Axes(chAxisPositionRight).MajorUnit = ch1.Axes(chAxisPositionLeft).MajorUnit
Ich hoffe jemand kann mir helfen
Mit freundlichen Grüßen
Steffen