作者:有海的地方最美_171 | 来源:互联网 | 2023-09-18 11:47
IambuildinganAsp.netStackedColumnchart.我正在构建一个Asp.net堆叠的列图。Hereishowitlooks:下面是它的样子
I am building an Asp.net Stacked Column chart.
我正在构建一个Asp.net堆叠的列图。
Here is how it looks :
下面是它的样子:
Here is how it should look :
它应该是这样的:
Ignore the numbers on the chart but look at the X axis - Why does it give me 1148,1153, 1163 when they do not appear in the data.
忽略图表上的数字,看看X轴——为什么它给出1148,1153,1163,当它们不出现在数据中。
Here is my Data :
以下是我的数据:
Here is the code:
这是代码:
Dim chart As New Chart
chart.ID = "Chart1"
Dim chartareas As New ChartArea
chart.ChartAreas.Add(chartareas)
chart.DataBindCrossTable(DtFinalRecords.DefaultView, "OutcomeScore", "TermID", "RecordsPerGroup", "Label=RecordsPerGroup")
chart.ChartAreas(0).AxisX.MajorGrid.Enabled = False
chart.ChartAreas(0).AxisY.MajorGrid.Enabled = False
For Each cs As Series In chart.Series
cs.ChartType = SeriesChartType.StackedColumn
Next
pnlcharts.Controls.Add(chart)
Any help would be appreciated. Thank you!
如有任何帮助,我们将不胜感激。谢谢你!
1 个解决方案