Exemplo n.º 1
0
            public void SetValuesCellRange(CellRangeAddressBase range)
            {
                int count = SetVerticalCellRange(dataValues, range);

                series.NumValues = (short)count;
            }
Exemplo n.º 2
0
            public void SetCategoryLabelsCellRange(CellRangeAddressBase range)
            {
                int count = SetVerticalCellRange(dataCategoryLabels, range);

                series.NumCategories = (short)count;
            }
Exemplo n.º 3
0
            private int SetVerticalCellRange(LinkedDataRecord linkedDataRecord,
                                                 CellRangeAddressBase range)
            {
                if (linkedDataRecord == null)
                {
                    throw new ArgumentNullException("linkedDataRecord should not be null"); ;
                }

                List<Ptg> ptgList = new List<Ptg>();

                int rowCount = (range.LastRow - range.FirstRow) + 1;
                int colCount = (range.LastColumn - range.FirstColumn) + 1;

                foreach (Ptg ptg in linkedDataRecord.FormulaOfLink)
                {
                    if (ptg is AreaPtgBase)
                    {
                        AreaPtgBase areaPtg = (AreaPtgBase)ptg;

                        areaPtg.FirstRow = range.FirstRow;
                        areaPtg.LastRow = range.LastRow;

                        areaPtg.FirstColumn = range.FirstColumn;
                        areaPtg.LastColumn = range.LastColumn;
                        ptgList.Add(areaPtg);
                    }
                }

                linkedDataRecord.FormulaOfLink = (ptgList.ToArray());

                return rowCount * colCount;
            }