I'm using Steema TeeChart for .NET 2013 4.1.2013.07300 for Windows phone 7, iOS and Android (with Xamarin)
I'm drawing a bar chart with the following code (Windows phone 7 version):
Code: Select all
var tChart = new TChart();
tChart.Legend.LegendStyle = LegendStyles.Series;
tChart.Legend.Alignment = LegendAlignments.Bottom;
tChart.Header.Visible = false;
tChart.Aspect.GestureOptions = Steema.TeeChart.Silverlight.Drawing.Aspect.Gestures.None;
tChart.Aspect.GestureStyle = Steema.TeeChart.Silverlight.Drawing.Aspect.GestureStyles.InChart;
tChart.Aspect.RenderSeriesAsImage = true;
tChart.Series.Clear();
tChart.Aspect.View3D = true;
tChart.Aspect.Orthogonal = true;
tChart.Header.Visible = true;
tChart.Header.Text = Strings.RealTimeStatisticsByResource;
tChart.Header.HorizontalAlignment = HorizontalAlignment.Center;
tChart.Header.Font.Size = 14;
//Alarms
String subheader = "";
foreach (var resourceStatData in data)
{
if (resourceStatData.Alarms.Count > 0)
{
if (!string.IsNullOrEmpty(subheader))
{
subheader += " | ";
}
subheader += resourceStatData.Name + " : ";
int index = 0;
foreach (var alarmInfo in resourceStatData.Alarms)
{
if (index == 0)
{
subheader += ",";
}
subheader += alarmInfo.Name;
index++;
}
}
}
if (!string.IsNullOrEmpty(subheader))
{
tChart.SubHeader.Visible = true;
tChart.SubHeader.Font.Size = 8;
tChart.SubHeader.Font.Color = Colors.Red;
tChart.SubHeader.HorizontalAlignment = HorizontalAlignment.Center;
tChart.SubHeader.Text = subheader;
}
else
{
tChart.SubHeader.Visible = false;
}
var registered = new Bar { Title = Strings.Registered, Color = Colors.Gray};
registered.GetSeriesMark += GetSeriesMark;
registered.BarStyle = BarStyles.RectGradient;
if (stacked)
{
registered.MultiBar = MultiBars.Stacked;
registered.MarksOnBar = true;
}
var busy = new Bar { Title = Strings.Busy, Color = Colors.Blue };
busy.GetSeriesMark += GetSeriesMark;
if (stacked)
{
busy.MultiBar = MultiBars.Stacked;
busy.MarksOnBar = true;
}
var pause = new Bar { Title = Strings.Paused, Color = Colors.Yellow };
pause.GetSeriesMark += GetSeriesMark;
if (stacked)
{
pause.MultiBar = MultiBars.Stacked;
pause.MarksOnBar = true;
}
var free = new Bar { Title = Strings.Free, Color = Colors.Green };
free.GetSeriesMark += GetSeriesMark;
if (stacked)
{
free.MultiBar = MultiBars.Stacked;
free.MarksOnBar = true;
}
var deferred = new Bar { Title = Strings.Deferred, Color = Colors.Brown };
deferred.GetSeriesMark += GetSeriesMark;
if (stacked)
{
deferred.MultiBar = MultiBars.Stacked;
deferred.MarksOnBar = true;
}
var other = new Bar { Title = Strings.OtherSkill, Color = Colors.Red };
other.GetSeriesMark += GetSeriesMark;
if (stacked)
{
other.MultiBar = MultiBars.Stacked;
other.MarksOnBar = true;
}
if (stacked)
{
registered.Active = false;
}
tChart.Series.Add(registered);
tChart.Series.Add(busy);
tChart.Series.Add(pause);
tChart.Series.Add(free);
tChart.Series.Add(deferred);
tChart.Series.Add(other);
foreach (var item in data)
{
string name;
if (item.IsLogicalResource())
{
name = String.Format("{0}\nT: {1} s Q: {2}", item.Name, item.QueueMaxTime, item.QueueTotal);
}
else
{
name = item.Name;
}
registered.Add(item.RegisteredTotal, name);
busy.Add(item.BusyTotal, name);
deferred.Add(item.DeferredTotal, name);
free.Add(item.FreeTotal, name);
other.Add(item.OtherskillTotal, name);
pause.Add(item.PauseTotal, name);
}
In android version only the legend color is wrong.
Is this a known bug?