Hi,
After reading posts in different sited for hours, i couldn't find the problem in my code.
I'm using telerik rad chart and need to create a stacked bar chart, according to this data table structure:
Work Week Product Quantity
-------------------------------------------------------
201401 a 10
201401 a 20
201402 a 5
201402 b 10
201402 c 6
201418 a 10
201418 b 25
I know there is a similar question to this, and you referred them to:
http://www.telerik.com/help/aspnet-ajax/chart-grouping-databound-items.html
but its not helping.
My code is:
RadChart1.DataSource = dataForGraph; //dataForGraph is a data table
RadChart1.DataGroupColumn = "product";
RadChart1.PlotArea.XAxis.DataLabelsColumn = "WW";
RadChart1.Legend.Appearance.GroupNameFormat = "#NAME:#VALUE";
RadChart1.DataBind();
foreach (ChartSeries s in RadChart1.Series)
{
s.Type = ChartSeriesType.StackedBar;
}
And the result is that the quantity is stacked in wrong places (for example quantity 25 is in 201401 instead of 201418)
What am i doing wrong?
Thx,
After reading posts in different sited for hours, i couldn't find the problem in my code.
I'm using telerik rad chart and need to create a stacked bar chart, according to this data table structure:
Work Week Product Quantity
-------------------------------------------------------
201401 a 10
201401 a 20
201402 a 5
201402 b 10
201402 c 6
201418 a 10
201418 b 25
I know there is a similar question to this, and you referred them to:
http://www.telerik.com/help/aspnet-ajax/chart-grouping-databound-items.html
but its not helping.
My code is:
RadChart1.DataSource = dataForGraph; //dataForGraph is a data table
RadChart1.DataGroupColumn = "product";
RadChart1.PlotArea.XAxis.DataLabelsColumn = "WW";
RadChart1.Legend.Appearance.GroupNameFormat = "#NAME:#VALUE";
RadChart1.DataBind();
foreach (ChartSeries s in RadChart1.Series)
{
s.Type = ChartSeriesType.StackedBar;
}
And the result is that the quantity is stacked in wrong places (for example quantity 25 is in 201401 instead of 201418)
What am i doing wrong?
Thx,