Document Solutions for Excel, Java Edition | Document Solutions
Features / Chart / Chart Types / Specialized Chart / Funnel
In This Topic
    Funnel
    In This Topic

    Funnel charts help in visualizing sequential stages in a linear process such as order fulfillment. In such processes, each stage represents a proportion (percentage) of the total. Therefore, the chart takes the funnel shape with the first stage being the largest and each subsequent stage smaller than the predecessor. The Funnel charts can be used to represent stages in a sales process and represent the amount of potential revenue for each stage. This type of chart is useful in finding potential problem areas in an organization's sales processes. For instance, with Funnel charts, a user can plot the order fulfillment process that tracks number of orders getting across a stage.

    Using Code

    Refer to the following code to add a Funnel chart:

    Java
    Copy Code
    private static void FunnelChart() {
        // Initialize workbook
        Workbook workbook = new Workbook();
        // Fetch default worksheet
        IWorksheet worksheet = workbook.getWorksheets().get(0);
    
        // Prepare data for chart
        worksheet.getRange("A1:B9")
                .setValue(new Object[][] { 
                { null, "Sales" }, 
                { "Consultation", 140000 }, 
                { "Prospects", 120000 },
                { "Qualified", 100000 }, 
                { "Negotiations", 80000 }, 
                { "Prototype", 60000 },
                { "Closing", 40000 }, 
                { "Won", 20000 }, 
                { "Finalized", 10000 } });
        worksheet.getRange("A:B").getColumns().autoFit();
    
        // Add Funnel Chart
        IShape funnelChartshape = worksheet.getShapes().addChart(ChartType.Funnel, 300, 20, 300, 200);
        funnelChartshape.getChart().getSeriesCollection().add(worksheet.getRange("A1:B9"));
    
        // Configure Chart Title
        funnelChartshape.getChart().getChartTitle().setText("Sales Pipeline");
    
        // Configure Axis
        IAxis axis = funnelChartshape.getChart().getAxes().item(AxisType.Category, AxisGroup.Primary);
        axis.setVisible(true);
    
        // Saving workbook to Xlsx
        workbook.save("34-FunnelChart.xlsx", SaveFileFormat.Xlsx);