Skip to main content
All docs
V26.1
  • MapSeries Class

    A series that displays data in a map chart.

    Namespace: DevExpress.Docs.Office

    Assembly: DevExpress.Docs.Core.v26.1.dll

    NuGet Package: DevExpress.Docs.Core

    Declaration

    public class MapSeries :
        DataSeriesExBase

    The following members return MapSeries objects:

    Remarks

    The following code snippet creates a map series and assigns category and value ranges.

    using DevExpress.Docs.Office;
    using DevExpress.Docs.Presentation;
    
    namespace PresentationApiSample;
    
    public class Program {
        public static async Task Main(string[] _) {
    
            Presentation presentation = new Presentation();
            presentation.Slides.Clear();
            Slide slide = new Slide(SlideLayoutType.Blank);
            presentation.Slides.Add(slide);
    
            // Insert a chart that fills the slide.
            ChartEx chart = new ChartEx();
            chart.Width = presentation.SlideSize.Width;
            chart.Height = presentation.SlideSize.Height;
            slide.Shapes.Add(chart);
    
            MapSeries mapSeries = new MapSeries {
                Text = "Sales by Country",
                Arguments = new ChartStringData(new[] { "United States", "Canada", "Mexico" }),
                Values = new ChartNumericData(new[] { 120.0, 80.0, 45.0 })
            };
            chart.Series.Add(mapSeries);
    
            // Save the result to a file.
            var outputPath = @"D:\presentation.pptx";
            using FileStream outputStream = new(outputPath, FileMode.Create, FileAccess.Write, FileShare.None);
            presentation.SaveDocument(outputStream);
    
        }
    }
    

    Implements

    See Also