by Anonymous » 27 Jan 2025, 09:38
Ich mache ein Excel -Diagramm über Interop Excel C#.
Code: Select all
MSWord.Series Serie_graphique = m_theChart.SeriesCollection().NewSeries();
Serie_graphique.XValues = x.ToArray();
Serie_graphique.Values = poteaux.ToArray();
Serie_graphique.Format.Line.Weight = 0;
Serie_graphique.MarkerStyle = MSWord.XlMarkerStyle.xlMarkerStyleNone;
Ich habe dann Daten in die zweite Achsengruppe eingefügt:
Code: Select all
MSWord.Series Serie_graphique = m_theChart.SeriesCollection().NewSeries();
Serie_graphique.AxisGroup = MSWord.XlAxisGroup.xlSecondary;
Serie_graphique.XValues = x.ToArray();
Serie_graphique.Values = vitesse.ToArray();
Serie_graphique.Format.Line.Weight = 0;
Serie_graphique.MarkerStyle = MSWord.XlMarkerStyle.xlMarkerStyleNone;
Serie_graphique.Format.Line.ForeColor.RGB = couleur;
Serie_graphique.Name = "Vitesse";
< /code>
Diese beiden Schritte waren nicht schwierig.
Ich möchte die X -Achse für beide Serien umkehren. Kann die Primärachse (auch bekannt als xlaxisgroup.xlprimary) leicht umkehren. 'Zeile:
Ich mache das, nachdem die Daten eingefügt werden. < /p>
var xaxes2 = m_theChart.Axes(MSWord.XlAxisType.xlCategory, XlAxisGroup.xlSecondary) as Axis;
xaxes2.HasMajorGridlines = xaxes2.HasMinorGridlines = true;
xaxes2.HasTitle = true;
xaxes2.AxisTitle.Text = "PK";
xaxes2.ReversePlotOrder = true;// x
Ich weiß nicht, was ich tun soll

Vielen Dank für Ihre Hilfe.
Ich mache ein Excel -Diagramm über Interop Excel C#.[code] MSWord.Series Serie_graphique = m_theChart.SeriesCollection().NewSeries();
Serie_graphique.XValues = x.ToArray();
Serie_graphique.Values = poteaux.ToArray();
Serie_graphique.Format.Line.Weight = 0;
Serie_graphique.MarkerStyle = MSWord.XlMarkerStyle.xlMarkerStyleNone;
[/code]
Ich habe dann Daten in die zweite Achsengruppe eingefügt:
[code] MSWord.Series Serie_graphique = m_theChart.SeriesCollection().NewSeries();
Serie_graphique.AxisGroup = MSWord.XlAxisGroup.xlSecondary;
Serie_graphique.XValues = x.ToArray();
Serie_graphique.Values = vitesse.ToArray();
Serie_graphique.Format.Line.Weight = 0;
Serie_graphique.MarkerStyle = MSWord.XlMarkerStyle.xlMarkerStyleNone;
Serie_graphique.Format.Line.ForeColor.RGB = couleur;
Serie_graphique.Name = "Vitesse";
< /code>
Diese beiden Schritte waren nicht schwierig.
Ich möchte die X -Achse für beide Serien umkehren. Kann die Primärachse (auch bekannt als xlaxisgroup.xlprimary) leicht umkehren. 'Zeile:
Ich mache das, nachdem die Daten eingefügt werden. < /p>
var xaxes2 = m_theChart.Axes(MSWord.XlAxisType.xlCategory, XlAxisGroup.xlSecondary) as Axis;
xaxes2.HasMajorGridlines = xaxes2.HasMinorGridlines = true;
xaxes2.HasTitle = true;
xaxes2.AxisTitle.Text = "PK";
xaxes2.ReversePlotOrder = true;// x
[/code]
Ich weiß nicht, was ich tun soll :)
Vielen Dank für Ihre Hilfe.