This question is locked. New answers and comments are not allowed.
Hi,
We are using rad chart which shows data in the form of "Month-to-Month". This is basically stacked bar chart. The months will be shown as Jan-12,Feb-12,Mar-12 etc. on Axis-X Labels. Each month will have 4 different Y-Series bind to them namely y1,y2,y3,y4. The requirement is that when user clicks one of the y-series for particular month, then all other y-series for that month and all other months should be grayed out and y-series clicked by user should be highlighted.We are using BuildCustomItemStyle() method to gray out and hightlight y-series.
The issue is our logic works perfectly fine for all months except for the 1st month. Suppose we have data plotted from Jan-12 to Dec-12. Now, if user selects any of the y-series for "May-12" , then our requirement mentioned above works fine. But if user select any of the y-series for "Jan-12", then other y-series for "Jan-12" month and all y-series for other months are not grayed out correctly..
Our BuildCustomItemStyle() method look like below way :
private Style BuildCustomItemStyle(Control item, Style style, DataPoint point, DataSeries dataSeries)
{
if (item is BaseChartItem)
{
BaseChartItem baseChartItem = item as BaseChartItem;
DataPoint dataPoint = dataSeries[baseChartItem.CurrentIndex];
DataItem dataItem= dataPoint.DataItem as DataItem ;
;
if (!dataItem.Selected)
{
if (dataSeries.Definition.SeriesName == "YSeries1")
{
style = yseries1Style;
}
else if (dataSeries.Definition.SeriesName == "YSeries2")
{
style = yseries2Style;
}
else if (dataSeries.Definition.SeriesName == "YSeries3")
{
style = yseries3Style;
}
else if(dataSeries.Definition.SeriesName == "YSeries4")
{
style = yseries4Style;
; }
}
}
return style;
}
Let us know your view on this ASAP as we are stopped on this.
Regards,
Kinnar
We are using rad chart which shows data in the form of "Month-to-Month". This is basically stacked bar chart. The months will be shown as Jan-12,Feb-12,Mar-12 etc. on Axis-X Labels. Each month will have 4 different Y-Series bind to them namely y1,y2,y3,y4. The requirement is that when user clicks one of the y-series for particular month, then all other y-series for that month and all other months should be grayed out and y-series clicked by user should be highlighted.We are using BuildCustomItemStyle() method to gray out and hightlight y-series.
The issue is our logic works perfectly fine for all months except for the 1st month. Suppose we have data plotted from Jan-12 to Dec-12. Now, if user selects any of the y-series for "May-12" , then our requirement mentioned above works fine. But if user select any of the y-series for "Jan-12", then other y-series for "Jan-12" month and all y-series for other months are not grayed out correctly..
Our BuildCustomItemStyle() method look like below way :
private Style BuildCustomItemStyle(Control item, Style style, DataPoint point, DataSeries dataSeries)
{
if (item is BaseChartItem)
{
BaseChartItem baseChartItem = item as BaseChartItem;
DataPoint dataPoint = dataSeries[baseChartItem.CurrentIndex];
DataItem dataItem= dataPoint.DataItem as DataItem ;
;
if (!dataItem.Selected)
{
if (dataSeries.Definition.SeriesName == "YSeries1")
{
style = yseries1Style;
}
else if (dataSeries.Definition.SeriesName == "YSeries2")
{
style = yseries2Style;
}
else if (dataSeries.Definition.SeriesName == "YSeries3")
{
style = yseries3Style;
}
else if(dataSeries.Definition.SeriesName == "YSeries4")
{
style = yseries4Style;
; }
}
}
return style;
}
Let us know your view on this ASAP as we are stopped on this.
Regards,
Kinnar