Profile Picture

Why Series on chart's SecondaryYAxis is not visible in StackedAreaChart??

Posted By Niranjan Singh 12 Years Ago

Why Series on chart's SecondaryYAxis is not visible in...

Author
Message
Niranjan Singh
Posted 12 Years Ago
View Quick Profile
Forum Member

Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)

Group: Forum Members
Last Active: 4 Years Ago
Posts: 49, Visits: 179
I have added 3 Series to StackedAreaChart and First two are shown corresponding to PrimaryYAxis and third one is shown respect to SecondaryYAxis, But it does not shown on the chart..

//code to create series..
NAreaSeries stackedAreaSeries = new NAreaSeries();
stackedAreaSeries.UniqueId = new Guid(outputVariable.UniqueId);
stackedAreaSeries.Name = outputVariable.LegendText;
chart.Series.Add(stackedAreaSeries);
indexOfSeries = chart.Series.IndexOf(stackedAreaSeries);

stackedAreaSeries.MultiAreaMode = chart.Series.Count == 1 ?
MultiAreaMode.Series : MultiAreaMode.StackedPercent;
ConfigureChartSeries(stackedAreaSeries, indexOfSeries, outputVariable);
SetSeriesAxisInformation(stackedAreaSeries, outputVariable.Unit);
stackedAreaSeries.UseXValues = true;
foreach (DataRow row in seriesDataTable.Rows)
{
stackedAreaSeries.XValues.Add(Convert.ToDateTime(row["col1"]));
}
dataBindingManager.AddBinding(0, indexOfSeries, "Values", seriesDataTable, outputVariable.UniqueId);
Check the attached image..


// It is used with some condition to specify the series on axis and working good with all other series except StackArea Area and StackAreaPercent Chart..
series.DisplayOnAxis(StandardAxis.PrimaryY, true);
series.DisplayOnAxis(StandardAxis.SecondaryY, false);


Is there any description that show what are the data requirements to use these chart. e.g. whether they need minimum 2 series or something like that..

Is there any solution of above problem, Any reference or suggestion will be admired..

Thanks in advance..








Similar Topics


Reading This Topic