在y barchart aspx中设置最大值
我想将y值从0设置为10乘10的跳跃。我找不到有关如何设置它的任何文档,属性或相关帖子。感谢任何帮助。 我将ASPX和ASPX.VB用作后端文件。
aspx文件
<asp:BarChart
ID="BarChart1"
runat="server"
ChartHeight="300"
ChartWidth="1200"
ChartType="Column"
ChartTitleColor="#0095AA"
CategoryAxisLineColor="#99A7B7"
ValueAxisLineColor="#99A7B7"
BaseLineColor="#666666"
CssClass="nolegend noborder">
</asp:BarChart>
aspx.vb函数
Private Sub fillGraph()
Dim dtFacultad = getFacultad()
Dim total = dtFacultad.Rows.Count - 1
Dim x As String() = data
Dim y As Decimal() = New Decimal(total) {}
For i As Integer = 0 To total
y(i) = i * 10 'Dummy data'
Next
BarChart1.Series.Add(New AjaxControlToolkit.BarChartSeries() With {
.Data = y
})
BarChart1.CategoriesAxis = String.Join(",", x)
BarChart1.ChartWidth = (x.Length * 125).ToString()
End Sub
I want to set the Y values from 0 to 100 jumping 10 by 10. I can't find any docs, property or a related post about how to set it up. I would appreciate any help.
I'm using aspx and aspx.vb as the backend file.
aspx file
<asp:BarChart
ID="BarChart1"
runat="server"
ChartHeight="300"
ChartWidth="1200"
ChartType="Column"
ChartTitleColor="#0095AA"
CategoryAxisLineColor="#99A7B7"
ValueAxisLineColor="#99A7B7"
BaseLineColor="#666666"
CssClass="nolegend noborder">
</asp:BarChart>
aspx.vb function
Private Sub fillGraph()
Dim dtFacultad = getFacultad()
Dim total = dtFacultad.Rows.Count - 1
Dim x As String() = data
Dim y As Decimal() = New Decimal(total) {}
For i As Integer = 0 To total
y(i) = i * 10 'Dummy data'
Next
BarChart1.Series.Add(New AjaxControlToolkit.BarChartSeries() With {
.Data = y
})
BarChart1.CategoriesAxis = String.Join(",", x)
BarChart1.ChartWidth = (x.Length * 125).ToString()
End Sub
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试
,您将在y轴上从10到10的间隔,y轴的最大值为100。
Try
With this you'll have interval from 10 to 10 in Y axis and also the maximum value in Y axis will be 100.