Skip to main content
You are viewing help content for pre-release software. This document and the features it describes are subject to change.
All docs
V26.1
  • DevExpress Presentation API: Get Started with ChartEx (Office 2016 and later)

    • 2 minutes to read

    This topic describes how to create a ChartEx, add it to a presentation, and customize its settings.

    Add a ChartEx with a Data Series to a Presentation

    • Add a ChartEx object to a slide’s Shapes collection.

    • Specify the chart’s Width and Height properties.

    • Specify the chart’s ChartData property to define the data source for the chart. For more information on how to load data to a chart, refer to the following help topic: Load Data to Charts.

    • Create a series of the required type and add it to the chart’s Series collection.

    • Specify the series Arguments and Values properties to define the series data points.

    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);
    
            ChartEx chart = new ChartEx();
            slide.Shapes.Add(chart);
    
            chart.Width = presentation.SlideSize.Width;
            chart.Height = presentation.SlideSize.Height;
    
            WaterfallSeries series = new WaterfallSeries();
            series.Text = "Cash Flow";
            series.Arguments = new ChartStringData(new[] { "Start", "Jan", "Feb", "Mar", "End" });
            series.Values = new ChartNumericData(new[] { 0.0, 12.0, -5.0, 8.0, 15.0 });
    
            chart.Series.Add(series);
        }
    }
    

    Supported Series Types

    The ChartExType enumeration lists chart types available for the ChartEx class:

    Chart type Series type
    Box and Whisker
    DevExpress Presentation API - Charts - Box and Whisker
    BoxAndWhiskerSeries
    Funnel
    DevExpress Presentation API - Charts - Funnel
    FunnelSeries
    Histogram
    DevExpress Presentation API - Charts - Histogram
    HistogramSeries
    Pareto
    DevExpress Presentation API - Charts - Pareto
    ParetoSeries
    Filled Map
    DevExpress Presentation API - Charts - Map
    MapSeries
    Sunburst
    DevExpress Presentation API - Charts - Sunburst
    SunburstSeries
    Treemap
    DevExpress Presentation API - Charts - Treemap
    TreemapSeries
    Waterfall
    DevExpress Presentation API - Charts - Waterfall
    WaterfallSeries