In [ ]:
#r "nuget: Plotly.NET, 3.0.0"
#r "nuget: Plotly.NET.Interactive, 3.0.0"

FunnelArea Charts


Summary: This example shows how to create funnel area charts in F#.

let's first create some data for the purpose of creating example charts:

In [3]:
let values = [|5; 4; 3; 2; 1|]
let text = [|"The 1st"; "The 2nd"; "The 3rd"; "The 4th"; "The 5th"|]

FunnelArea charts visualize stages in a process using area-encoded trapezoids. This trace can be used to show data in a part-to-whole representation similar to a "pie" trace, wherein each item appears in a single stage. See also the the Funnel chart for a different approach to visualizing funnel data.

In [4]:
open Plotly.NET 

let line = Line.init (Color=Color.fromString "purple", Width=3.)

let funnelArea = 
    Chart.FunnelArea(values, MultiText=text, SectionOutline=line)
In [ ]:
Out[ ]:

More styled example

This example shows the usage of some of the styling possibility using Chart.FunnelArea. For even more styling control, use the respective TraceStyle function TraceDomainStyle.FunnelArea

In [6]:
let funnelAreaStyled =
    let values = [|5; 4; 3|]
    let labels = [|"The 1st"; "The 2nd"; "The 3rd"|]

        Labels = labels,
        MultiText = labels,
        SectionColors = [
            Color.fromKeyword Aqua
            Color.fromKeyword Salmon
            Color.fromKeyword Tan
        SectionOutlineColor = Color.fromKeyword Black,
        SectionOutlineWidth = 2.,
        AspectRatio = 0.75,
        BaseRatio = 0.1
In [ ]:
Out[ ]: