Exemplo n.º 1
0
        private LibraryCollection <double> TryGetXValues()
        {
            var sdkXValues = _firstSeries.Value?.GetFirstChild <C.XValues>();

            if (sdkXValues == null)
            {
                return(null);
            }
            var points = PointValueParser.FromNumRef(sdkXValues.NumberReference, _sdkChartPart.EmbeddedPackagePart);

            return(new LibraryCollection <double>(points));
        }
Exemplo n.º 2
0
        private List <double> GetPointValues(OpenXmlElement sdkSeries)
        {
            C.NumberReference numberReference;
            var cVal = sdkSeries.GetFirstChild <C.Values>();

            if (cVal != null) // scatter type chart does not have <c:val> element
            {
                numberReference = cVal.NumberReference;
            }
            else
            {
                numberReference = sdkSeries.GetFirstChild <C.YValues>().NumberReference;
            }

            return(PointValueParser.FromNumRef(numberReference, _sdkChartPart.EmbeddedPackagePart).ToList()); //TODO: remove to list
        }