Пример #1
0
        public void TestAccessMethods()
        {
            IWorkbook     wb      = new XSSFWorkbook();
            ISheet        sheet   = wb.CreateSheet();
            IDrawing      Drawing = sheet.CreateDrawingPatriarch();
            IClientAnchor anchor  = Drawing.CreateAnchor(0, 0, 0, 0, 1, 1, 10, 30);
            IChart        chart   = Drawing.CreateChart(anchor);
            IValueAxis    axis    = chart.ChartAxisFactory.CreateValueAxis(AxisPosition.Bottom);

            axis.SetCrossBetween(AxisCrossBetween.MidpointCategory);
            Assert.AreEqual(axis.GetCrossBetween(), AxisCrossBetween.MidpointCategory);

            axis.Crosses = (AxisCrosses.AutoZero);
            Assert.AreEqual(axis.Crosses, AxisCrosses.AutoZero);

            Assert.AreEqual(chart.GetAxis().Count, 1);
        }
Пример #2
0
        public void TestAccessMethods()
        {
            IWorkbook     wb      = new XSSFWorkbook();
            ISheet        sheet   = wb.CreateSheet();
            IDrawing      Drawing = sheet.CreateDrawingPatriarch();
            IClientAnchor anchor  = Drawing.CreateAnchor(0, 0, 0, 0, 1, 1, 10, 30);
            IChart        chart   = Drawing.CreateChart(anchor);
            IValueAxis    axis    = chart.GetChartAxisFactory().CreateValueAxis(AxisPosition.BOTTOM);

            axis.SetCrossBetween(AxisCrossBetween.MIDPOINT_CATEGORY);
            Assert.AreEqual(axis.GetCrossBetween(), AxisCrossBetween.MIDPOINT_CATEGORY);

            axis.SetCrosses(AxisCrosses.AUTO_ZERO);
            Assert.AreEqual(axis.GetCrosses(), AxisCrosses.AUTO_ZERO);

            Assert.AreEqual(chart.GetAxis().Count, 1);
        }