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..





Attachments
Stacked_Area.gif (70 views, 34.00 KB)
Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Niranjan,

When you use a stack series only the properties for axis scaling of the master series are regarded. If you need to use a secondary axis you can create an invisible series and insert values that define that axis range there.



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic