DUN11 Posted March 29, 2011 Report Share Posted March 29, 2011 Hello, We have the next situation in the chart we have 2 types of series: Bar type and the second one Scatter type. The series of type Bar are stacked. The series of type Scatter are not included in the group of stacked series. As result we have the chart like in picture: section "Stacked". Here is the code: ucChart.AllSeries.PointLabels.Visible = true; ucChart.AllSeries.PointLabels.LineAlignment = StringAlignment.Far; ucChart.AllSeries.PointLabels.Alignment = StringAlignment.Center; ucChart.AllSeries.Gallery = Gallery.Bar; ucChart.AllSeries.BarShape = BarShape.Cylinder; ucChart.Series[0].Stacked = true; ucChart.Series[0].PointLabels.Alignment = StringAlignment.Center; ucChart.Series[0].PointLabels.LineAlignment = StringAlignment.Center; ucChart.Series[1].Stacked = true; ucChart.Series[1].PointLabels.Alignment = StringAlignment.Center; ucChart.Series[1].PointLabels.LineAlignment = StringAlignment.Center; //ucChart.AllSeries.Stacked = Stacked.Stacked100; ucChart.Series[2].Stacked = false; ucChart.Series[2].Gallery = Gallery.Scatter; ucChart.Series[2].MarkerShape = MarkerShape.Marble; AxisY oAxisY = new AxisY(); oAxisY.Visible = true; oAxisY.Position = AxisPosition.Far; oAxisY.ForceZero = true; oAxisY.Step = 30; oAxisY.LabelsFormat.Format = AxisFormat.Number; oAxisY.LabelsFormat.Decimals = 0; oAxisY.LabelsFormat.CustomFormat = "0"; ucChart.AxesY.Add(oAxisY); ucChart.Series[2].AxisY = oAxisY; If I uncomment the line: ucChart.AllSeries.Stacked = Stacked.Stacked100, I Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.