Hello
I'd like to change width of box chart with following codes :
void server_GetGraphDataCompleted(object sender, GetGraphDataCompletedEventArgs e)
{
List<GraphEntity> result = e.Result;
Animation animation = new Animation();
animation.BeginTime = TimeSpan.Zero;
animation.Duration = TimeSpan.FromSeconds(1);
animation.Sequential = true;
Series seriesBT = new Series();
seriesBT.Label = "BT";
seriesBT.ChartType = ChartType.Line;
seriesBT.DataMapping = "Label=ColumnTime;Value=BTValue";
seriesBT.DataSource = result;
seriesBT.Animation = animation;
webChart.Series.Add(seriesBT);
Series seriesSP = new Series();
seriesSP.Label = "SpO2";
seriesSP.ChartType = ChartType.Line;
seriesSP.DataMapping = "Label=ColumnTime;Value=SpO2Value";
seriesSP.DataSource = result;
seriesSP.Animation = animation;
webChart.Series.Add(seriesSP);
var resultForBoxChart = from c in e.Result
select new BoxChartEntity
Label = c.ColumnTime.Value,
Max = c.Open,
Q3 = c.Open,
Q2 = ((c.Open + c.Close) / 2),
Q1 = c.Close,
Min = c.Close
};
Series seriesABP = new Series();
seriesABP.Label = "ABP";
seriesABP.ChartType = ChartType.Box;
seriesABP.DataMapping = "Label=ColumnTime;Max=Max;Q3=Q3;Q2=Q2;Q1=Q1;Min=Min";
seriesABP.DataSource = resultForBoxChart;
seriesABP.Animation = animation;
seriesABP.StrokeThickness = 0;
seriesABP.Width = 10;
webChart.Series.Add(seriesABP);
}
However, even though I change the width of box type chart, it is not working
What did I wrong?
Thanks in advance
Kwon
You're trying to set the width of the Series object, not the width of the chart. Did you mean to set the width of the chart's parent layout element? I'm not sure what you're trying to accomplish.