第一件事是...... y 轴默认显示带有逗号的值。我希望他们改为显示整数。我该怎么做呢?
正如您在 x 轴上看到的那样,根据图表,月份都被弄乱了。您看到的图表应该从 Jun 开始,因此,之前的几个月不应该出现。我不能删除六月之前的几个月,因为有些情况需要显示它们。我该怎么做呢?
除了显示月份,我还想显示年份。所以外汇。Jun 的年份是 98。所以它应该显示 Jun-98 和 Nov-99
提前致谢。
这是我的一些代码:
string[] months = {"Jan, Feb, Mar, April, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec"};
int[] monthCount = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
窗格.XAxis.Type = AxisType.Text;
pane.X2Axis.IsVisible = true;
pane.X2Axis.Title.Text = "Totally " + totaRegistering + " registrations in the entire period";
pane.YAxis.Scale.IsReverse = false;
pane.X2Axis.Type = AxisType.Text;
pane.XAxis.Scale.Min = minXValueToScale;
pane.XAxis.Scale.Max = maxXValueToScale;
pane.YAxis.Scale.Min = minYValToScale;
pane.YAxis.Scale.Max = maxYValToScale;
double[] xVal = new double[tableCount], yVal = new double[tableCount];
for (int i = 0; i < dataSet.Tables[objectName].Rows.Count; i++ )
{
xVal[i] = Convert.ToInt32(dataSet.Tables[objectName].Rows[i][resForXAxis]);
yVal[i] = Convert.ToInt32(dataSet.Tables[objectName].Rows[i][resForYAxis]);
}
list1 = new PointPairList(xVal, yVal);
curve1 = pane.AddCurve("Male and Female", list1, Color.Green, SymbolType.Circle);
pane.XAxis.Scale.TextLabels = months;
curve1.Line.Width = 2.0F;
pane.GetImage().Save(outputDest, ImageFormat.Png);