本文整理汇总了C#中NPOI.HSSF.UserModel.HSSFSheet.InsertChartRecords方法的典型用法代码示例。如果您正苦于以下问题:C# HSSFSheet.InsertChartRecords方法的具体用法?C# HSSFSheet.InsertChartRecords怎么用?C# HSSFSheet.InsertChartRecords使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NPOI.HSSF.UserModel.HSSFSheet
的用法示例。
在下文中一共展示了HSSFSheet.InsertChartRecords方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateBarChart
/**
* Creates a bar chart. API needs some work. :)
*
* NOTE: Does not yet work... checking it in just so others
* can take a look.
*/
public void CreateBarChart(HSSFWorkbook workbook, HSSFSheet sheet)
{
List<RecordBase> records = new List<RecordBase>();
records.Add(CreateMSDrawingObjectRecord());
records.Add(CreateOBJRecord());
records.Add(CreateBOFRecord());
records.Add(new HeaderRecord(string.Empty));
records.Add(new FooterRecord(string.Empty));
records.Add(CreateHCenterRecord());
records.Add(CreateVCenterRecord());
records.Add(CreatePrintSetupRecord());
// unknown 33
records.Add(CreateFontBasisRecord1());
records.Add(CreateFontBasisRecord2());
records.Add(new ProtectRecord(false));
records.Add(CreateUnitsRecord());
records.Add(CreateChartRecord(0, 0, 30434904, 19031616));
records.Add(CreateBeginRecord());
records.Add(CreateSCLRecord((short)1, (short)1));
records.Add(CreatePlotGrowthRecord(65536, 65536));
records.Add(CreateFrameRecord1());
records.Add(CreateBeginRecord());
records.Add(CreateLineFormatRecord(true));
records.Add(CreateAreaFormatRecord1());
records.Add(CreateEndRecord());
records.Add(CreateSeriesRecord());
records.Add(CreateBeginRecord());
records.Add(CreateTitleLinkedDataRecord());
records.Add(CreateValuesLinkedDataRecord());
records.Add(CreateCategoriesLinkedDataRecord());
records.Add(CreateDataFormatRecord());
// records.Add(CreateBeginRecord());
// unknown
// records.Add(CreateEndRecord());
records.Add(new SerToCrtRecord());
records.Add(CreateEndRecord());
records.Add(CreateSheetPropsRecord());
records.Add(CreateDefaultTextRecord((short)TextFormatInfo.FontScaleNotSet));
records.Add(CreateAllTextRecord());
records.Add(CreateBeginRecord());
// unknown
records.Add(CreateFontIndexRecord(5));
records.Add(CreateDirectLinkRecord());
records.Add(CreateEndRecord());
records.Add(CreateDefaultTextRecord((short)3)); // eek, undocumented text type
records.Add(CreateUnknownTextRecord());
records.Add(CreateBeginRecord());
records.Add(CreateFontIndexRecord((short)6));
records.Add(CreateDirectLinkRecord());
records.Add(CreateEndRecord());
records.Add(CreateAxisUsedRecord((short)1));
CreateAxisRecords(records);
records.Add(CreateEndRecord());
records.Add(CreateDimensionsRecord());
records.Add(CreateSeriesIndexRecord(2));
records.Add(CreateSeriesIndexRecord(1));
records.Add(CreateSeriesIndexRecord(3));
records.Add(EOFRecord.instance);
sheet.InsertChartRecords(records);
workbook.InsertChartRecord();
}