public void TestAccessMethods() { XSSFWorkbook wb = new XSSFWorkbook(); XSSFSheet sheet = wb.CreateSheet() as XSSFSheet; XSSFDrawing Drawing = sheet.CreateDrawingPatriarch() as XSSFDrawing; XSSFClientAnchor anchor = Drawing.CreateAnchor(0, 0, 0, 0, 1, 1, 10, 30) as XSSFClientAnchor; XSSFChart chart = Drawing.CreateChart(anchor) as XSSFChart; XSSFCategoryAxis axis = chart.ChartAxisFactory.CreateCategoryAxis(AxisPosition.Bottom) as XSSFCategoryAxis; axis.Crosses = (AxisCrosses.AutoZero); Assert.AreEqual(axis.Crosses, AxisCrosses.AutoZero); Assert.AreEqual(chart.GetAxis().Count, 1); }
public IChartAxis CreateCategoryAxis(AxisPosition pos) { long id = axis.Count + 1; XSSFCategoryAxis categoryAxis = new XSSFCategoryAxis(this, id, pos); if (axis.Count == 1) { IChartAxis ax = axis[0]; ax.CrossAxis(categoryAxis); categoryAxis.CrossAxis(ax); } axis.Add(categoryAxis); return(categoryAxis); }