I am trying to data bind a Html Chart as a Bar chart with multiple Range Bar series but I get the error telling me the DataFieldY does not support polar types and use the DataRadiusField. this is my code so far.
List<RangeBarSeries> series = new List<RangeBarSeries>();
for(int i = 1; i < 11; i++)
{
RangeBarChart1.PlotArea.XAxis.Items.Add("Equipment " + i);
RangeBarSeries barSeries = new RangeBarSeries();
barSeries.AxisName = "Equipment " + i;
barSeries.TooltipsAppearance.ClientTemplate = "Start #= value.from # End #= value.to #";
barSeries.Name = "Equipment " + i;
barSeries.Spacing = -1;
series.Add(barSeries);
}
for (int i = 0; i < 25; i ++)
{
RangeSeriesItem item = new RangeSeriesItem();
if(i % 2 == 0)
{
item.BackgroundColor = System.Drawing.Color.Green;
}
else
{
item.BackgroundColor = System.Drawing.Color.Red;
}
decimal f = i;
decimal t = Convert.ToDecimal(i + 0.01);
item.From = f;
item.To = t;
foreach(RangeBarSeries barSeries in series)
{
barSeries.SeriesItems.Add(item);
}
}
RangeBarChart1.DataSource = series;
RangeBarChart1.DataBind();
Hi Shahroze,
Could you please share the HtmlChart markup code so that we can see how is everything configured?
Based on that we will have better feedback to share.
I look forward to hearing from you.