hi~
I have a problem.
I have two bar series, and one of the two has a negative value.
So I used a Y Axes(PrimaryY Axis & SecondaryY Axis).
But I can't align zero point each other.
What should i do?
Thanks~~
sample code:
NChart m_Chart;
NBarSeries m_Bar1;
NBarSeries m_Bar2;
Random random = new Random();
m_Chart = nChartControl1.Charts[0];
// add a bar series
m_Bar1 = (NBarSeries)m_Chart.Series.Add(SeriesType.Bar);
m_Bar1.MultiBarMode = MultiBarMode.Series;
m_Bar1.DataLabelStyle.Visible = false;
// add another bar series
m_Bar2 = (NBarSeries)m_Chart.Series.Add(SeriesType.Bar);
m_Bar2.MultiBarMode = MultiBarMode.Clustered;
m_Bar2.DataLabelStyle.Visible = false;
// fill with random data
m_Bar1.Values.FillRandomRange(random, 5, -100, 100);
m_Bar2.Values.FillRandomRange(random, 5, 10, 500);
m_Bar1.DisplayOnAxis(StandardAxis.PrimaryY, false);
m_Bar1.DisplayOnAxis(StandardAxis.SecondaryY, true);
m_Chart.Axis(StandardAxis.SecondaryY).Visible = true;
m_Chart.Axis(StandardAxis.PrimaryX).Anchor = new NCrossAxisAnchor(AxisOrientation.Horizontal, new NValueAxisCrossing(m_Chart.Axis(StandardAxis.PrimaryY), 0));
m_Chart.Axis(StandardAxis.PrimaryX).Anchor.RulerOrientation = RulerOrientation.Right;
m_Chart.Axis(StandardAxis.PrimaryY).View = new NRangeAxisView(new NRange1DD(0, 0), false, false);
NStyleSheet.CreatePredefinedStyleSheet(PredefinedStyleSheet.Nevron).Apply(nChartControl1.Document);