Hi
this is the definition of the BarChart That I use
<ajaxToolkit:BarChart ID="ActivitiesPerfomance" runat="server" Width="100%"></ajaxToolkit:BarChart>
Then I used this code to create new bars dynamically
BarChartSqlDataSource.SelectParameters.Clear()
BarChartSqlDataSource.SelectParameters.Add("sectionID", SectionId)
BarChartSqlDataSource.SelectParameters.Add("sequience", sequience)
BarChartSqlDataSource.SelectParameters.Add("intervalStart", TypeCode.DateTime, Request.QueryString("from"))
BarChartSqlDataSource.SelectParameters.Add("intervalEnd", TypeCode.DateTime, Request.QueryString("to"))
Dim dv2 As DataView = DirectCast(BarChartSqlDataSource.Select(DataSourceSelectArguments.Empty), DataView)
Dim barChart As AjaxControlToolkit.BarChart = TryCast(rptrActivities.Controls(rptrActivities.Controls.Count - 1).Controls(0).FindControl("ActivitiesPerfomance"), AjaxControlToolkit.BarChart)
For Each drv As DataRowView In dv2
Dim item As DataRow = drv.Row
Dim bars(2) As Decimal
bars(1) = item("target")
bars(2) = item("achieved")
barChart.Series.Add(New AjaxControlToolkit.BarChartSeries() With {
.Data = bars,
.BarColor = "red",
.Name = "V"
})
NextIf I run it, it creates the bars with value 0 for all of them such as in this picture
https://ibb.co/pKVnmwy
The dataview contains 8 records in this case, I expected 16 Bars since I added two bars in each iteration of the (for each) loop
I noticed it adds 8 (Names) as expected, but I see no bars there
any help please?