Hi,
I have a stacked100 bar chart. It "seems" to be structured the way I want it structured, it's just the colors aren't contrasting.
I did a mouseover on the "Jan 2014" so you can see it is indeed breaking it into the percentages properly (see attached).
How do I get the colors to contrast or did I simply structure the code incorrectly? (admittedly series and categories confuse me at times)
Thanks for your help.
Code:
DataTable dt = new DataTable();
dt = f.CallStoredProcedure("rptHitRate_Chart");
BarSeries b1 = new Telerik.WinControls.UI.BarSeries();
BarSeries b2 = new Telerik.WinControls.UI.BarSeries();
b1.CombineMode = ChartSeriesCombineMode.Stack100;
//b2.CombineMode = ChartSeriesCombineMode.Stack100;
chartHitRate_Monthly.Series.Add(b1);
foreach (DataRow dr in dt.Rows)
{
CategoricalDataPoint cdp = new CategoricalDataPoint((double)dr["ApprovalRate"], dr["DateGroup"]);
CategoricalDataPoint cdp2 = new CategoricalDataPoint((double)dr["DeclineRate"], dr["DateGroup"]);
b1.DataPoints.Add(cdp);
b1.DataPoints.Add(cdp2);
}
data layout:
DateGroup ApprovalRate DeclineRate
Jan 2014 0.368421052631579 0.631578947368421
Feb 2014 0.75 0.25
Mar 2014 0.568965517241379 0.431034482758621
Apr 2014 0.423728813559322 0.576271186440678
May 2014 0.392857142857143 0.607142857142857
Jun 2014 0.457627118644068 0.542372881355932
Jul 2014 0.433962264150943 0.566037735849057
Aug 2014 0.315789473684211 0.684210526315789
I have a stacked100 bar chart. It "seems" to be structured the way I want it structured, it's just the colors aren't contrasting.
I did a mouseover on the "Jan 2014" so you can see it is indeed breaking it into the percentages properly (see attached).
How do I get the colors to contrast or did I simply structure the code incorrectly? (admittedly series and categories confuse me at times)
Thanks for your help.
Code:
DataTable dt = new DataTable();
dt = f.CallStoredProcedure("rptHitRate_Chart");
BarSeries b1 = new Telerik.WinControls.UI.BarSeries();
BarSeries b2 = new Telerik.WinControls.UI.BarSeries();
b1.CombineMode = ChartSeriesCombineMode.Stack100;
//b2.CombineMode = ChartSeriesCombineMode.Stack100;
chartHitRate_Monthly.Series.Add(b1);
foreach (DataRow dr in dt.Rows)
{
CategoricalDataPoint cdp = new CategoricalDataPoint((double)dr["ApprovalRate"], dr["DateGroup"]);
CategoricalDataPoint cdp2 = new CategoricalDataPoint((double)dr["DeclineRate"], dr["DateGroup"]);
b1.DataPoints.Add(cdp);
b1.DataPoints.Add(cdp2);
}
data layout:
DateGroup ApprovalRate DeclineRate
Jan 2014 0.368421052631579 0.631578947368421
Feb 2014 0.75 0.25
Mar 2014 0.568965517241379 0.431034482758621
Apr 2014 0.423728813559322 0.576271186440678
May 2014 0.392857142857143 0.607142857142857
Jun 2014 0.457627118644068 0.542372881355932
Jul 2014 0.433962264150943 0.566037735849057
Aug 2014 0.315789473684211 0.684210526315789